|
19 | 19 | csrf_https_domain = "https://" + os.environ.get("DOMAIN_NAME").split(':')[0] |
20 | 20 | csrf_http_domain = "http://" + os.environ.get("DOMAIN_NAME").split(':')[0] |
21 | 21 |
|
22 | | -CSRF_TRUSTED_ORIGINS = [csrf_https_domain, csrf_http_domain] |
23 | | -CSRF_ALLOWED_ORIGINS = [csrf_https_domain, csrf_http_domain] |
| 22 | +if os.environ.get("EXTERNAL_DOMAIN_NAME", "") != "": |
| 23 | + csrf_https_external_domain = "https://" + os.environ.get("EXTERNAL_DOMAIN_NAME", "").split(':')[0] |
| 24 | + csrf_http_external_domain = "http://" + os.environ.get("EXTERNAL_DOMAIN_NAME", "").split(':')[0] |
| 25 | + CSRF_TRUSTED_ORIGINS = [csrf_https_domain, csrf_http_domain, csrf_https_external_domain, csrf_http_external_domain] |
| 26 | + CSRF_ALLOWED_ORIGINS = [csrf_https_domain, csrf_http_domain, csrf_https_external_domain, csrf_http_external_domain] |
24 | 27 |
|
25 | | -SITE_ID = 1 |
| 28 | + DOMAIN_NAME = os.environ.get('EXTERNAL_DOMAIN_NAME').split(':')[0] |
| 29 | +else: |
| 30 | + CSRF_TRUSTED_ORIGINS = [csrf_https_domain, csrf_http_domain] |
| 31 | + CSRF_ALLOWED_ORIGINS = [csrf_https_domain, csrf_http_domain] |
26 | 32 |
|
27 | | -SITE_DOMAIN = os.environ.get('SITE_DOMAIN', 'http://localhost') |
28 | | -DOMAIN_NAME = os.environ.get('DOMAIN_NAME', 'localhost').split(':')[0] |
| 33 | + DOMAIN_NAME = os.environ.get('DOMAIN_NAME', 'localhost').split(':')[0] |
29 | 34 |
|
30 | | -SELENIUM_HOSTNAME = os.environ.get("SELENIUM_HOSTNAME", "localhost") |
| 35 | +SITE_DOMAIN = os.environ.get('SITE_DOMAIN', 'http://localhost') |
| 36 | +SITE_ID = 1 |
31 | 37 |
|
32 | 38 |
|
33 | 39 | THIRD_PARTY_APPS = ( |
|
0 commit comments