From 6d47ddf89f2b7f5a4c8597cfbb97c2a127c4ede6 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 22 Feb 2024 16:40:52 +1100 Subject: [PATCH] fix: Async hns script to fix site loading --- server.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index e91a42b..0498b72 100644 --- a/server.py +++ b/server.py @@ -8,6 +8,7 @@ app = Flask(__name__) dotenv.load_dotenv() address = '' +handshake_scripts = '' # Custom header def add_custom_header(response): @@ -113,7 +114,6 @@ def index(): html_url=git['repo']['html_url'] repo = "" + repo_name + "" - handshake_scripts = "" # If localhost, don't load handshake if request.host == "localhost:5000" or request.host == "127.0.0.1:5000" or os.getenv('dev') == "true" or request.host == "test.nathan.woodburn.au": handshake_scripts = "" @@ -133,7 +133,7 @@ def index(): @app.route('/now') def now(): - handshake_scripts = "" + # If localhost, don't load handshake if request.host == "localhost:5000" or request.host == "127.0.0.1:5000" or os.getenv('dev') == "true" or request.host == "test.nathan.woodburn.au": handshake_scripts = "" @@ -148,7 +148,6 @@ def now(): @app.route('/') def catch_all(path): - handshake_scripts = "" # If localhost, don't load handshake if request.host == "localhost:5000" or request.host == "127.0.0.1:5000" or os.getenv('dev') == "true" or request.host == "test.nathan.woodburn.au": handshake_scripts = ""