From ea3c91ef8837db3042f8b9980e5377d9b4b64e0c Mon Sep 17 00:00:00 2001 From: Nicole O'Connor Date: Mon, 13 Feb 2023 13:26:50 -0800 Subject: [PATCH] add flask.request.host to top of rendered template, debugging why it's not pulling stuff from s3 --- app/pylocal/core.py | 4 ++-- app/templates/main_page.j2 | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/pylocal/core.py b/app/pylocal/core.py index af2d58e..0425675 100644 --- a/app/pylocal/core.py +++ b/app/pylocal/core.py @@ -11,7 +11,7 @@ def render_base_context(): global base_context global base_context_live - print(flask.request.host) + base_context["svchost"] = flask.request.host domain_components = flask.request.host.split(".") base_domain = ".".join(domain_components[-2:]) @@ -31,4 +31,4 @@ def render_base_context(): @app.route("/core/ping") def aws_healthcheck_ping(): - return flask.make_response("OK", content_type="text/plain") \ No newline at end of file + return flask.Response("OK", content_type="text/plain") \ No newline at end of file diff --git a/app/templates/main_page.j2 b/app/templates/main_page.j2 index 7337ee6..3e8ca88 100644 --- a/app/templates/main_page.j2 +++ b/app/templates/main_page.j2 @@ -1,4 +1,5 @@ + Seagull Game