diff options
author | 2018-03-29 10:10:45 +0100 | |
---|---|---|
committer | 2018-03-29 10:10:45 +0100 | |
commit | bcbada49e27136725c4cde1567e95107d5fd5ff8 (patch) | |
tree | 3d02712dd35e2328260f3a9442e449ed4338274f /pysite/route_manager.py | |
parent | OAuth fixes (diff) |
Add PREFERRED_URL_SCHEME env var to fix `url_for()`
Diffstat (limited to 'pysite/route_manager.py')
-rw-r--r-- | pysite/route_manager.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pysite/route_manager.py b/pysite/route_manager.py index 9ecd3ced..14ae22db 100644 --- a/pysite/route_manager.py +++ b/pysite/route_manager.py @@ -10,8 +10,8 @@ from flask_sockets import Sockets from pysite.base_route import APIView, BaseView, ErrorView, RouteView from pysite.constants import ( - DISCORD_OAUTH_ID, DISCORD_OAUTH_SCOPE, DISCORD_OAUTH_SECRET, DISCORD_OAUTH_REDIRECT, DISCORD_OAUTH_AUTHORIZED -) + DISCORD_OAUTH_ID, DISCORD_OAUTH_SCOPE, DISCORD_OAUTH_SECRET, DISCORD_OAUTH_REDIRECT, DISCORD_OAUTH_AUTHORIZED, + PREFERRED_URL_SCHEME) from pysite.database import RethinkDB from pysite.oauth import OauthBackend from pysite.websockets import WS @@ -33,6 +33,7 @@ class RouteManager: self.log = logging.getLogger() self.app.secret_key = os.environ.get("WEBPAGE_SECRET_KEY", "super_secret") self.app.config["SERVER_NAME"] = os.environ.get("SERVER_NAME", "pythondiscord.local:8080") + self.app.config["PREFERRED_URL_SCHEME"] = PREFERRED_URL_SCHEME self.app.before_request(self.db.before_request) self.app.teardown_request(self.db.teardown_request) |