Hello! Big thank for you solution and I found how make it with only one line in wsgi_server.py:
def application(environ, start_response): if config['proxy_mode'] and 'HTTP_X_FORWARDED_HOST' in environ: + werkzeug.serving.WSGIRequestHandler.address_string = lambda self: self.headers.get('x-real-ip', self.client_address[0]) return werkzeug.contrib.fixers.ProxyFix(application_unproxied)(environ, start_response) else: return application_unproxied(environ, start_response)
Hello! Big thank for you solution and I found how make it with only one line in wsgi_server.py:
def application( environ, start_response): 'proxy_ mode'] and 'HTTP_X_ FORWARDED_ HOST' in environ: serving. WSGIRequestHand ler.address_ string = lambda self: self.headers. get('x- real-ip' , self.client_ address[ 0]) contrib. fixers. ProxyFix( application_ unproxied) (environ, start_response) unproxied( environ, start_response)
if config[
+ werkzeug.
return werkzeug.
else:
return application_