From e8be94e51942d63c05d5b6a229590a90ec620ac2 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 11 Jul 2022 10:04:00 +0300 Subject: Allow CORS everywhere by default Allow the resources (endpoints) to be accessible from anywhere on the internet by default, while still allowing for restriction via CLI environment variable on a case by case basis. --- gn3/settings.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gn3/settings.py b/gn3/settings.py index 78ae7cb..35f6f05 100644 --- a/gn3/settings.py +++ b/gn3/settings.py @@ -46,10 +46,7 @@ def parse_env_cors(default): origin.strip() for origin in origins_str.split(",") if origin != ""] return default -CORS_ORIGINS = parse_env_cors([ - "http://localhost:*", - "http://127.0.0.1:*" -]) +CORS_ORIGINS = parse_env_cors("*") CORS_HEADERS = [ "Content-Type", -- cgit v1.2.3