From 347f5127929b17671c75734af5a374ec4f39b5ae Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Fri, 8 Jul 2022 15:19:32 +1000 Subject: Revert back to using vite-proxy for avoiding CORS issues --- backend/cgi-bin/data.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'backend/cgi-bin/data.py') diff --git a/backend/cgi-bin/data.py b/backend/cgi-bin/data.py index b02cfc9..c1ea181 100755 --- a/backend/cgi-bin/data.py +++ b/backend/cgi-bin/data.py @@ -8,8 +8,7 @@ import gzip, jsonpickle dbFile = "data/data.db" DEFAULT_SUGG_LIM = 5 MAX_SUGG_LIM = 50 -CORS_ANY_ORIGIN = True # Used during development to avoid Cross-Origin Resource Sharing restrictions -ROOT_NAME = 'cellular organisms' +ROOT_NAME = "cellular organisms" usageInfo = f""" Usage: {sys.argv[0]} @@ -230,8 +229,6 @@ def respondJson(val): content = gzip.compress(content, compresslevel=5) print(f"Content-length: {len(content)}") print(f"Content-encoding: gzip") - if CORS_ANY_ORIGIN: - print("Access-Control-Allow-Origin: *") print() sys.stdout.flush() sys.stdout.buffer.write(content) -- cgit v1.2.3