File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ def _read_secret(secret_name, default = None):
120
120
CORS_ORIGIN_WHITELIST = list (filter (None , environ .get ('CORS_ORIGIN_WHITELIST' , 'https://localhost' ).split (' ' )))
121
121
CORS_ORIGIN_REGEX_WHITELIST = [re .compile (r ) for r in list (filter (None , environ .get ('CORS_ORIGIN_REGEX_WHITELIST' , '' ).split (' ' )))]
122
122
123
+ # Cross-Site-Request-Forgery-Attack settings. If Netbox is sitting behind a reverse proxy, you might need to set the CSRF_TRUSTED_ORIGINS flag.
124
+ # Django 4.0 requires to specify the URL Scheme in this setting. An example environment variable could be specified like:
125
+ # CSRF_TRUSTED_ORIGINS=https://demo.netbox.dev http://demo.netbox.dev
126
+ CSRF_TRUSTED_ORIGINS = list (filter (None , environ .get ('CSRF_TRUSTED_ORIGINS' , '' ).split (' ' )))
127
+
123
128
# Set to True to enable server debugging. WARNING: Debugging introduces a substantial performance penalty and may reveal
124
129
# sensitive information about your installation. Only enable debugging while performing testing. Never enable debugging
125
130
# on a production system.
You can’t perform that action at this time.
0 commit comments