From 797db5e1a93fbc8da0fc350ef2996a5c5d567185 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Tue, 5 Dec 2023 18:35:08 +1100 Subject: [PATCH] feat: Add a manual address to stop issues with address index --- server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 7001bfc..dbd4d30 100644 --- a/server.py +++ b/server.py @@ -113,11 +113,13 @@ def index(): 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 = "" + if request.cookies.get('HNS'): return render_template('index.html', handshake_scripts=handshake_scripts, HNS=request.cookies.get('HNS'), repo=repo, repo_description=repo_description, custom=custom) - address = getAddress() + if handshake_scripts != "": + address = getAddress() # Set cookie resp = make_response(render_template('index.html', handshake_scripts=handshake_scripts, HNS=address, repo=repo, repo_description=repo_description, custom=custom), 200, {'Content-Type': 'text/html'}) # Cookie should last 1 week @@ -144,7 +146,8 @@ def catch_all(path): def getAddress(): global address if address == '': - address = requests.get('http://hip02-server:3000').text + address = 'hs1qv3uu4amv87g7p7h49xez2pmzwjf92am0wzpnh4' + # address = requests.get('http://hip02-server:3000').text? return address