mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-01 21:36:25 -06:00
Fixes #4442: Set X_FRAME_OPTIONS for Django 3.x
This commit is contained in:
parent
0432b1a6f9
commit
a825e977cd
@ -472,3 +472,9 @@ SHORT_TIME_FORMAT = 'H:i:s' # 13:23:00
|
||||
DATETIME_FORMAT = 'N j, Y g:i a' # June 26, 2016 1:23 p.m.
|
||||
SHORT_DATETIME_FORMAT = 'Y-m-d H:i' # 2016-06-27 13:23
|
||||
```
|
||||
|
||||
## X_FRAME_OPTIONS
|
||||
|
||||
Default: SAMEORIGIN
|
||||
|
||||
Clickjacking middleware to protect against malicious embedding of elements of this site in another, which needs to be relaxed so that embedded Rack SVGs display. For more information please see [the Django documentation](https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-X_FRAME_OPTIONS)
|
||||
|
@ -231,3 +231,7 @@ TIME_FORMAT = 'g:i a'
|
||||
SHORT_TIME_FORMAT = 'H:i:s'
|
||||
DATETIME_FORMAT = 'N j, Y g:i a'
|
||||
SHORT_DATETIME_FORMAT = 'Y-m-d H:i'
|
||||
|
||||
# Embedded objects needed for Rack SVG
|
||||
# https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-X_FRAME_OPTIONS
|
||||
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
||||
|
@ -111,6 +111,7 @@ SHORT_DATETIME_FORMAT = getattr(configuration, 'SHORT_DATETIME_FORMAT', 'Y-m-d H
|
||||
SHORT_TIME_FORMAT = getattr(configuration, 'SHORT_TIME_FORMAT', 'H:i:s')
|
||||
TIME_FORMAT = getattr(configuration, 'TIME_FORMAT', 'g:i a')
|
||||
TIME_ZONE = getattr(configuration, 'TIME_ZONE', 'UTC')
|
||||
X_FRAME_OPTIONS = getattr(configuration, 'X_FRAME_OPTIONS', 'SAMEORIGIN')
|
||||
|
||||
# Validate update repo URL and timeout
|
||||
if RELEASE_CHECK_URL:
|
||||
|
Loading…
Reference in New Issue
Block a user