Skip to content

Commit

Permalink
Add support for DD_APPEND_SLASH (DefectDojo#9385)
Browse files Browse the repository at this point in the history
* Override default Django APPEND_SLASH

* Update dojo/settings/settings.dist.py
  • Loading branch information
kiblik authored Feb 6, 2024
1 parent 7b566f9 commit ebbe1e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dojo/settings/settings.dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
DD_SECURE_CONTENT_TYPE_NOSNIFF=(bool, True),
DD_CSRF_COOKIE_SAMESITE=(str, 'Lax'),
DD_SESSION_COOKIE_SAMESITE=(str, 'Lax'),
DD_APPEND_SLASH=(bool, True),
DD_TIME_ZONE=(str, 'UTC'),
DD_LANG=(str, 'en-us'),
DD_TEAM_NAME=(str, 'Security Team'),
Expand Down Expand Up @@ -673,6 +674,9 @@ def generate_url(scheme, double_slashes, user, password, host, port, path, param
SESSION_COOKIE_SECURE = env('DD_SESSION_COOKIE_SECURE')
SESSION_COOKIE_SAMESITE = env('DD_SESSION_COOKIE_SAMESITE')

# Override default Django behavior for incorrect URLs
APPEND_SLASH = env('DD_APPEND_SLASH')

# Whether to use a secure cookie for the CSRF cookie.
CSRF_COOKIE_SECURE = env('DD_CSRF_COOKIE_SECURE')
CSRF_COOKIE_SAMESITE = env('DD_CSRF_COOKIE_SAMESITE')
Expand Down

0 comments on commit ebbe1e8

Please sign in to comment.