From 753de8a723bab368f7eaabe2b35bbf6d53e924f8 Mon Sep 17 00:00:00 2001 From: trinkey Date: Sun, 22 Dec 2024 00:07:48 -0500 Subject: [PATCH] fix regex + remove extraneous status=200 --- tcommon/settings.py | 2 +- tcommon/views/api.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tcommon/settings.py b/tcommon/settings.py index 4602367..f6f2f8a 100644 --- a/tcommon/settings.py +++ b/tcommon/settings.py @@ -35,4 +35,4 @@ USE_I18N = True USE_TZ = True CORS_ALLOW_ALL_ORIGINS = True -CORS_URLS_REGEX = r"^/static/.+$" +CORS_URLS_REGEX = r"^/(static|favicon)/.+$" diff --git a/tcommon/views/api.py b/tcommon/views/api.py index 081ae1c..d4150f3 100644 --- a/tcommon/views/api.py +++ b/tcommon/views/api.py @@ -50,6 +50,5 @@ def initialize(request: WSGIRequest) -> HttpResponse: return HttpResponse( json.dumps(resp), - content_type="application/json", - status=200 + content_type="application/json" )