From 5d334e4da59fae6be5874761adac88116248717a Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Mon, 6 Dec 2021 21:51:29 +0000 Subject: [PATCH] OG and Cookie settings --- ref-test/main.py | 3 +++ ref-test/quiz/templates/quiz/components/og-meta.html | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) 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() diff --git a/ref-test/quiz/templates/quiz/components/og-meta.html b/ref-test/quiz/templates/quiz/components/og-meta.html index ef31c74..5c63bca 100644 --- a/ref-test/quiz/templates/quiz/components/og-meta.html +++ b/ref-test/quiz/templates/quiz/components/og-meta.html @@ -2,12 +2,12 @@ - + - - + +