|
.oO SearXNG Developer Documentation Oo.
|
Public Member Functions | |
| __init__ (self, wsgi_app) | |
| __call__ (self, environ, start_response) | |
Public Attributes | |
| wsgi_app = wsgi_app | |
| script_name = None | |
| scheme = None | |
| server = None | |
Wrap the application in this middleware and configure the
front-end server to add these headers, to let you quietly bind
this to a URL other than / and to an HTTP scheme that is
different than what is used locally.
http://flask.pocoo.org/snippets/35/
In nginx:
location /myprefix {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Script-Name /myprefix;
}
:param wsgi_app: the WSGI application
Definition at line 11 of file flaskfix.py.
| searx.flaskfix.ReverseProxyPathFix.__init__ | ( | self, | |
| wsgi_app ) |
Definition at line 33 of file flaskfix.py.
| searx.flaskfix.ReverseProxyPathFix.__call__ | ( | self, | |
| environ, | |||
| start_response ) |
Definition at line 54 of file flaskfix.py.
References scheme, script_name, server, searx.botdetection.trusted_proxies.ProxyFix.wsgi_app, and wsgi_app.
| searx.flaskfix.ReverseProxyPathFix.scheme = None |
Definition at line 37 of file flaskfix.py.
Referenced by __call__().
| searx.flaskfix.ReverseProxyPathFix.script_name = None |
Definition at line 36 of file flaskfix.py.
Referenced by __call__().
| searx.flaskfix.ReverseProxyPathFix.server = None |
Definition at line 38 of file flaskfix.py.
Referenced by __call__().
| searx.flaskfix.ReverseProxyPathFix.wsgi_app = wsgi_app |
Definition at line 35 of file flaskfix.py.
Referenced by __call__().