File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ For `production.py`, we have the following:
28
28
29
29
``` python
30
30
CORS_ALLOW_ALL_ORIGINS = False
31
- CORS_ORIGIN_WHITELIST = env.list(' DJANGO_CORS_ORIGIN_WHITELIST ' , default = [])
31
+ CORS_ORIGIN_WHITELIST = env.list(' CORS_ORIGIN_WHITELIST ' , default = [])
32
32
```
33
33
34
34
### DRF
Original file line number Diff line number Diff line change 4
4
5
5
DEBUG = env .bool ('DJANGO_DEBUG' , default = False )
6
6
7
- SECRET_KEY = env ('DJANGO_SECRET_KEY ' )
7
+ SECRET_KEY = env ('SECRET_KEY ' )
8
8
9
- ALLOWED_HOSTS = env .list ('DJANGO_ALLOWED_HOSTS ' , default = [])
9
+ ALLOWED_HOSTS = env .list ('ALLOWED_HOSTS ' , default = [])
10
10
11
11
CORS_ALLOW_ALL_ORIGINS = False
12
- CORS_ORIGIN_WHITELIST = env .list ('DJANGO_CORS_ORIGIN_WHITELIST ' , default = [])
12
+ CORS_ORIGIN_WHITELIST = env .list ('CORS_ORIGIN_WHITELIST ' , default = [])
13
13
14
- SESSION_COOKIE_SECURE = env .bool ('DJANGO_SESSION_COOKIE_SECURE ' , default = True )
14
+ SESSION_COOKIE_SECURE = env .bool ('SESSION_COOKIE_SECURE ' , default = True )
15
15
16
16
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header
17
17
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO" , "https" )
18
18
# https://docs.djangoproject.com/en/dev/ref/settings/#secure-ssl-redirect
19
- SECURE_SSL_REDIRECT = env .bool ("DJANGO_SECURE_SSL_REDIRECT " , default = True )
19
+ SECURE_SSL_REDIRECT = env .bool ("SECURE_SSL_REDIRECT " , default = True )
20
20
# https://docs.djangoproject.com/en/dev/ref/middleware/#x-content-type-options-nosniff
21
21
SECURE_CONTENT_TYPE_NOSNIFF = env .bool (
22
- "DJANGO_SECURE_CONTENT_TYPE_NOSNIFF " , default = True
22
+ "SECURE_CONTENT_TYPE_NOSNIFF " , default = True
23
23
)
Original file line number Diff line number Diff line change 2
2
3
3
# https://docs.celeryproject.org/en/stable/userguide/configuration.html
4
4
5
- CELERY_BROKER_URL = env ('DJANGO_CELERY_BROKER_URL ' , default = 'amqp://guest:guest@localhost//' )
5
+ CELERY_BROKER_URL = env ('CELERY_BROKER_URL ' , default = 'amqp://guest:guest@localhost//' )
6
6
CELERY_RESULT_BACKEND = 'django-db'
7
7
8
8
CELERY_TIMEZONE = 'UTC'
Original file line number Diff line number Diff line change 7
7
1. https://docs.djangoproject.com/en/3.1/ref/settings/#sessions
8
8
2. https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
9
9
"""
10
- SESSION_COOKIE_AGE = env .int ('DJANGO_SESSION_COOKIE_AGE ' , default = 1209600 ) # Default - 2 weeks in seconds
11
- SESSION_COOKIE_HTTPONLY = env .bool ('DJANGO_SESSION_COOKIE_HTTPONLY ' , default = True )
12
- SESSION_COOKIE_NAME = env ('DJANGO_SESSION_COOKIE_NAME ' , default = 'sessionid' )
13
- SESSION_COOKIE_SAMESITE = env ('DJANGO_SESSION_COOKIE_SAMESITE ' , default = 'Lax' )
14
- SESSION_COOKIE_SECURE = env .bool ('DJANGO_SESSION_COOKIE_SECURE ' , default = False )
10
+ SESSION_COOKIE_AGE = env .int ('SESSION_COOKIE_AGE ' , default = 1209600 ) # Default - 2 weeks in seconds
11
+ SESSION_COOKIE_HTTPONLY = env .bool ('SESSION_COOKIE_HTTPONLY ' , default = True )
12
+ SESSION_COOKIE_NAME = env ('SESSION_COOKIE_NAME ' , default = 'sessionid' )
13
+ SESSION_COOKIE_SAMESITE = env ('SESSION_COOKIE_SAMESITE ' , default = 'Lax' )
14
+ SESSION_COOKIE_SECURE = env .bool ('SESSION_COOKIE_SECURE ' , default = False )
15
15
16
- CSRF_USE_SESSIONS = env .bool ('DJANGO_CSRF_USE_SESSIONS ' , default = True )
16
+ CSRF_USE_SESSIONS = env .bool ('CSRF_USE_SESSIONS ' , default = True )
You can’t perform that action at this time.
0 commit comments