Skip to content

Commit 459dacd

Browse files
Make CSRF_TRUSTED_ORIGINS configurable
1 parent ac0a785 commit 459dacd

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.env-sample

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ I2P_ALIAS = ''
5959
I2P_LONG = ''
6060
LOCAL_ALIAS = ''
6161

62+
# The name of the request header used for CSRF authentication.
63+
CSRF_TRUSTED_ORIGINS = 'http://localhost:12345, http://adminexample.onion'
64+
6265
# SECURITY WARNING: keep the secret key used in production secret!
6366
SECRET_KEY = 'django-insecure-6^&6uw$b5^en%(cu2kc7_o)(mgpazx#j_znwlym0vxfamn2uo-'
6467

robosats/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,6 @@
308308
INVOICE_AND_ESCROW_DURATION = 180
309309
# Time to confirm chat and confirm fiat (time to Fiat Sent confirmation) HOURS
310310
FIAT_EXCHANGE_DURATION = 24
311+
312+
# The name of the request header used for CSRF authentication.
313+
CSRF_TRUSTED_ORIGINS = config('CSRF_TRUSTED_ORIGINS', cast=lambda v: [s.strip() for s in v.split(',')], default=[])

0 commit comments

Comments
 (0)