mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
增加HTTPS_DOMAINS环境变量,用于设定反向代理域名,解决CSRF中断问题
This commit is contained in:
@@ -35,6 +35,9 @@ SECRET_KEY = 'django-insecure-6wrh^t$@gbb^s^=79@%cv=%yhq6gl^kane#g@-n-*n6+s1lo2f
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
if os.environ.get('HTTPS_DOMAINS'):
|
||||
CSRF_TRUSTED_ORIGINS = [os.environ.get('HTTPS_DOMAINS'), ]
|
||||
|
||||
# Application definition
|
||||
|
||||
|
||||
Reference in New Issue
Block a user