Skip to content

Commit 1fe7e34

Browse files
committed
fixes for csrf
1 parent 219e1c4 commit 1fe7e34

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

server/api/settings.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
else []
3939
)
4040

41+
CSRF_TRUSTED_ORIGINS = (
42+
"http://localhost:3000",
43+
"http://127.0.0.1:3000",
44+
os.environ.get("FRONTEND_URL"),
45+
)
4146

4247
# Application definition
4348

@@ -70,6 +75,7 @@
7075
CORS_ALLOWED_ORIGINS = [
7176
"http://localhost:3000",
7277
"http://127.0.0.1:3000",
78+
os.environ.get("FRONTEND_URL")
7379
]
7480

7581
ROOT_URLCONF = "api.urls"

0 commit comments

Comments
 (0)