defapplication(environ, start_response):# FIXME: is checking for the presence of HTTP_X_FORWARDED_HOST really useful?# we're ignoring the user configuration, and that means we won't# support the standardised Forwarded header once werkzeug supports# itif config['proxy_mode']and'HTTP_X_FORWARDED_HOST'in environ:return ProxyFix(application_unproxied)(environ, start_response)else:return application_unproxied(environ, start_response)