mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-24 18:47:23 +00:00
Merge remote-tracking branch 'oauth/patch-2' Fix oauth in combination with nginx reverse proxy
This commit is contained in:
commit
dea2600913
@ -36,7 +36,7 @@ from flask_principal import Principal
|
||||
from . import logger, cache_buster, cli, config_sql, ub, db, services
|
||||
from .reverseproxy import ReverseProxied
|
||||
from .server import WebServer
|
||||
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
|
||||
mimetypes.init()
|
||||
mimetypes.add_type('application/xhtml+xml', '.xhtml')
|
||||
@ -77,7 +77,7 @@ log = logger.create()
|
||||
|
||||
|
||||
def create_app():
|
||||
app.wsgi_app = ReverseProxied(app.wsgi_app)
|
||||
app.wsgi_app = ReverseProxied(ProxyFix(app.wsgi_app, x_for=1, x_host=1))
|
||||
# For python2 convert path to unicode
|
||||
if sys.version_info < (3, 0):
|
||||
app.static_folder = app.static_folder.decode('utf-8')
|
||||
|
Loading…
Reference in New Issue
Block a user