File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 259
259
# * https://docs.djangoproject.com/en/3.2/ref/clickjacking/
260
260
# Example conf:
261
261
# [security]
262
- # ssl = on
262
+ # needs_ssl = yes
263
263
264
264
SECURE_BROWSER_XSS_FILTER = True # Does no harm
265
265
266
266
_websecurity_config = WebSecurityConfigParser ()
267
- _tls_enabled = bool (_websecurity_config .getboolean ('security' , 'tls ' ))
268
- SESSION_COOKIE_SECURE = _tls_enabled
267
+ _needs_tls = bool (_websecurity_config .getboolean ('security' , 'needs_tls ' ))
268
+ SESSION_COOKIE_SECURE = _needs_tls
269
269
270
270
# Hack for hackers to use features like debug_toolbar etc.
271
271
# https://code.djangoproject.com/wiki/SplitSettings (Rob Golding's method)
Original file line number Diff line number Diff line change @@ -132,4 +132,7 @@ enabled = no
132
132
#post-logout-redirect-url=/magic/logout?nexthop=/
133
133
134
134
[security]
135
- # tls = off
135
+ # Whether NAV must be run under TLS or not. Toggling this to `yes` toggles web
136
+ # security features that are only available with TLS/SSL enabled. In
137
+ # development mode this defaults to `no`.
138
+ # needs_tls = no
Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ class WebSecurityConfigParser(NAVConfigParser):
7
7
DEFAULT_CONFIG_FILES = [str (Path ('webfront' ) / 'webfront.conf' )]
8
8
DEFAULT_CONFIG = u"""
9
9
[security]
10
- tls=off
10
+ needs_tls=no
11
11
"""
You can’t perform that action at this time.
0 commit comments