Add ProxyFix for OAuth

This commit is contained in:
Matthew Welch 2021-07-14 17:05:27 -07:00
parent d03f9cae0b
commit 4a47c78a1a

View File

@ -14,6 +14,7 @@ import requests
from flask import Flask, Response, current_app, flash, g, redirect, render_template, request, url_for, make_response from flask import Flask, Response, current_app, flash, g, redirect, render_template, request, url_for, make_response
from flask_login import LoginManager, current_user, login_required, login_user, logout_user from flask_login import LoginManager, current_user, login_required, login_user, logout_user
from oauthlib.oauth2 import WebApplicationClient from oauthlib.oauth2 import WebApplicationClient
from werkzeug.middleware.proxy_fix import ProxyFix
import func import func
from admin import admin from admin import admin
@ -46,6 +47,7 @@ def get_google_provider_cfg():
app = Flask(__name__) app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_for=1)
app.register_blueprint(comics.Comics) app.register_blueprint(comics.Comics)
app.register_blueprint(admin.Admin) app.register_blueprint(admin.Admin)
app.register_blueprint(tv_movies.TV_Movies) app.register_blueprint(tv_movies.TV_Movies)