From 5bedabdc662b1b625b1a534c26da287a8c72bcb8 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 28 Jan 2021 16:46:54 -0800 Subject: [PATCH] Move site.debug to _dev, _prod launchers. --- frontends/ycdl_flask/ycdl_flask_dev.py | 4 +++- frontends/ycdl_flask/ycdl_flask_prod.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontends/ycdl_flask/ycdl_flask_dev.py b/frontends/ycdl_flask/ycdl_flask_dev.py index e5eaa2d..b4fa6bb 100644 --- a/frontends/ycdl_flask/ycdl_flask_dev.py +++ b/frontends/ycdl_flask/ycdl_flask_dev.py @@ -21,9 +21,11 @@ from voussoirkit import vlogging import bot import ycdl - import backend +site = backend.site +site.debug = True + #################################################################################################### site = backend.site diff --git a/frontends/ycdl_flask/ycdl_flask_prod.py b/frontends/ycdl_flask/ycdl_flask_prod.py index f3ed401..61b0910 100644 --- a/frontends/ycdl_flask/ycdl_flask_prod.py +++ b/frontends/ycdl_flask/ycdl_flask_prod.py @@ -1,5 +1,7 @@ ''' This file is the WSGI entrypoint for remote / production use. +Note that YCDL currenty features no authentication, so using it remotely without +another kind of access control is probably a bad idea! If you are using Gunicorn, for example: gunicorn ycdl_flask_prod:site --bind "0.0.0.0:PORT" --access-logfile "-" @@ -14,6 +16,7 @@ import backend backend.site.wsgi_app = werkzeug.middleware.proxy_fix.ProxyFix(backend.site.wsgi_app) site = backend.site +site.debug = False # NOTE: Consider adding a local .json config file. youtube_core = ycdl.ytapi.Youtube(bot.get_youtube_key())