diff options
author | 2021-03-01 16:51:25 +0300 | |
---|---|---|
committer | 2021-03-01 16:51:25 +0300 | |
commit | c175279e4172160f0d119ddd93dce8a813fff69b (patch) | |
tree | a99534760e686c1004a2d0b820059c4257e8498f | |
parent | Merge branch 'main' into token-expiry (diff) |
Allows All CORS Requests On Development
Signed-off-by: Hassan Abouelela <[email protected]>
-rw-r--r-- | backend/__init__.py | 4 | ||||
-rw-r--r-- | docker-compose.yml | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/backend/__init__.py b/backend/__init__.py index d56edfb..5c91a65 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -16,8 +16,8 @@ ORIGINS = [ r"(https?://[^.?#]*.forms-frontend.pages.dev)", # Cloudflare Previews ] if not constants.PRODUCTION: - # Add localhost to allowed origins on non-production deployments - ORIGINS.append(r"(https?://localhost:\d{0,4})") + # Allow all hosts on non-production deployments + ORIGINS.append(r"(.*)") ALLOW_ORIGIN_REGEX = "|".join(ORIGINS) diff --git a/docker-compose.yml b/docker-compose.yml index 4e58ef7..8ee46be 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,3 +37,4 @@ services: - OAUTH2_CLIENT_SECRET - ALLOWED_URL - DEBUG=true + - PRODUCTION=false |