Skip to content

Commit

Permalink
[Fixes #12402] Adopt strict-origin-when-cross-origin Referrer Policy …
Browse files Browse the repository at this point in the history
…as default (#12403) (#12404)

* Referre poicy strict-origin-when-cross-origin as default

* adapt proxy tests to adapt to new referrer policy

(cherry picked from commit 8bb5eda)

Co-authored-by: Giovanni Allegri <[email protected]>
  • Loading branch information
github-actions[bot] and giohappy authored Jul 9, 2024
1 parent 750457b commit 5ac3601
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geonode/proxy/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class Response:
"Vary": "Authorization, Accept-Language, Cookie, origin",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "same-origin",
"Referrer-Policy": "strict-origin-when-cross-origin",
"Cross-Origin-Opener-Policy": "same-origin",
"X-Frame-Options": "SAMEORIGIN",
"Content-Language": "en",
Expand All @@ -236,7 +236,7 @@ class Response:
"Vary": "Authorization, Accept-Language, Cookie, origin",
"X-Content-Type-Options": "nosniff",
"X-XSS-Protection": "1; mode=block",
"Referrer-Policy": "same-origin",
"Referrer-Policy": "strict-origin-when-cross-origin",
"X-Frame-Options": "SAMEORIGIN",
"Content-Language": "en-us",
"Content-Length": "119",
Expand Down
1 change: 1 addition & 0 deletions geonode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@
SECURE_SSL_REDIRECT = ast.literal_eval(os.environ.get("SECURE_SSL_REDIRECT", "False"))
SECURE_HSTS_SECONDS = int(os.getenv("SECURE_HSTS_SECONDS", "3600"))
SECURE_HSTS_INCLUDE_SUBDOMAINS = ast.literal_eval(os.environ.get("SECURE_HSTS_INCLUDE_SUBDOMAINS", "True"))
SECURE_REFERRER_POLICY = os.environ.get("SECURE_REFERRER_POLICY", "strict-origin-when-cross-origin")

# Replacement of the default authentication backend in order to support
# permissions per object.
Expand Down

0 comments on commit 5ac3601

Please sign in to comment.