mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-07-01 18:30:34 +00:00
Use werkzeugs pre implemented ProxyFix middleware
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
import os
|
||||
import logging
|
||||
|
||||
@ -33,7 +34,13 @@ class Config:
|
||||
|
||||
@staticmethod
|
||||
def init_app(app):
|
||||
pass
|
||||
proxy_fix_kwargs = {
|
||||
'x_for': 1,
|
||||
'x_host': 1,
|
||||
'x_port': 1,
|
||||
'x_proto': 1,
|
||||
}
|
||||
app.wsgi_app = ProxyFix(app.wsgi_app, **proxy_fix_kwargs)
|
||||
|
||||
|
||||
class DevelopmentConfig(Config):
|
||||
|
Reference in New Issue
Block a user