From 43c159cfec42519069b4a5906d587b06bf696db2 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 1 Sep 2024 17:26:43 +0800 Subject: [PATCH] Fix CSRF --- backend/config/settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/config/settings.py b/backend/config/settings.py index 00b4ac5..c486651 100644 --- a/backend/config/settings.py +++ b/backend/config/settings.py @@ -47,8 +47,10 @@ ALLOWED_HOSTS = ['*'] CSRF_TRUSTED_ORIGINS = [ # Frontend f'{URL_SCHEME}://{FRONTEND_ADDRESS}:{FRONTEND_PORT}', + f'{URL_SCHEME}://{FRONTEND_ADDRESS}', # For external domains # Backend f'{URL_SCHEME}://{BACKEND_ADDRESS}:{BACKEND_PORT}', + f'{URL_SCHEME}://{BACKEND_ADDRESS}' # For external domains # You can also set up https://*.name.xyz for wildcards here ]