From c175279e4172160f0d119ddd93dce8a813fff69b Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Mon, 1 Mar 2021 16:51:25 +0300 Subject: Allows All CORS Requests On Development Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- backend/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend') 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) -- cgit v1.2.3