diff options
author | 2020-12-14 19:05:07 +0000 | |
---|---|---|
committer | 2020-12-14 19:05:07 +0000 | |
commit | 81eb6aeaec93274b2707aa2d01d2e92ccce81d2a (patch) | |
tree | 10c18ccecaf186a86f93aa6cb006e94c31a7efbf /backend/__init__.py | |
parent | Shorten var name to meet flake8 limits: (diff) |
Star allow CORS for now
Diffstat (limited to 'backend/__init__.py')
-rw-r--r-- | backend/__init__.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/backend/__init__.py b/backend/__init__.py index adf304d..6bc4963 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -9,14 +9,11 @@ from backend.authentication import JWTAuthenticationBackend from backend.route_manager import create_route_map from backend.middleware import DatabaseMiddleware -HOSTS = r"https://(?:(?:(?:.*--)?pydis-forms\.netlify\.app)|forms\.pythondiscord\.com)" -HAS_CUSTOM_HOST = os.getenv("ALLOWED_URL") is not None - middleware = [ Middleware( CORSMiddleware, - allow_origins=[os.getenv("ALLOWED_URL")] if HAS_CUSTOM_HOST else None, - allow_origin_regex=HOSTS if not HAS_CUSTOM_HOST else None, + # TODO: Convert this into a RegEx that works for prod, netlify & previews + allow_origins=["*"], allow_headers=[ "Authorization", "Content-Type" |