fix flash not display if SERVER_NAME set 127.0.0.1:9527
see https://github.com/mitsuhiko/flask/issues/323