From 724ffbfdf487ca627dee3d2755622016cb35f22f Mon Sep 17 00:00:00 2001 From: viveksantayana Date: Mon, 6 Dec 2021 20:10:27 +0000 Subject: [PATCH 1/2] Proxy Fix --- ref-test/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ref-test/main.py b/ref-test/main.py index 9729e0a..c1f0efe 100644 --- a/ref-test/main.py +++ b/ref-test/main.py @@ -8,6 +8,7 @@ from pymongo import MongoClient from pymongo.errors import ConnectionFailure from flask_wtf.csrf import CSRFProtect, CSRFError from flask_mail import Mail +from werkzeug.middleware.proxy_fix import ProxyFix from common.security import check_keyfile_exists, generate_keyfile import config @@ -70,6 +71,8 @@ def create_app(): Bootstrap(app) csrf = CSRFProtect(app) + app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1) + return app app = create_app() From cb39592bd3435bbf7f1d9001da355588b86671dc Mon Sep 17 00:00:00 2001 From: viveksantayana Date: Mon, 6 Dec 2021 21:47:02 +0000 Subject: [PATCH 2/2] Bugfixes: case sensitivity, percent sign rendering Temporary work-around: disabled client navbar home link to prevent exit --- ref-test/quiz/templates/quiz/client.html | 8 ++++++-- ref-test/quiz/templates/quiz/components/navbar.html | 2 +- ref-test/quiz/views.py | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ref-test/quiz/templates/quiz/client.html b/ref-test/quiz/templates/quiz/client.html index 867b303..d901359 100644 --- a/ref-test/quiz/templates/quiz/client.html +++ b/ref-test/quiz/templates/quiz/client.html @@ -142,8 +142,12 @@
- - + + +
+
+ +
diff --git a/ref-test/quiz/templates/quiz/components/navbar.html b/ref-test/quiz/templates/quiz/components/navbar.html index 38d3e94..b0c041b 100644 --- a/ref-test/quiz/templates/quiz/components/navbar.html +++ b/ref-test/quiz/templates/quiz/components/navbar.html @@ -1,6 +1,6 @@