From 9ca63baeeb191017ecf594194d7874e7845f53b0 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Wed, 10 Apr 2024 12:28:10 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8(backend)=20add=20local=20CSRF=5FTR?= =?UTF-8?q?USTED=5FORIGINS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To allow the frontend to make requests to the backend, we need to add the frontend's origin to the CSRF_TRUSTED_ORIGINS setting. --- src/backend/impress/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/impress/settings.py b/src/backend/impress/settings.py index beefc096..6696952a 100755 --- a/src/backend/impress/settings.py +++ b/src/backend/impress/settings.py @@ -412,7 +412,7 @@ class Development(Base): ALLOWED_HOSTS = ["*"] CORS_ALLOW_ALL_ORIGINS = True - CSRF_TRUSTED_ORIGINS = ["http://localhost:8072"] + CSRF_TRUSTED_ORIGINS = ["http://localhost:8072", "http://localhost:3000"] DEBUG = True SESSION_COOKIE_NAME = "impress_sessionid"