From f0b2693cd3daf17ef4d650642999d413cbb086e6 Mon Sep 17 00:00:00 2001 From: Lukas Hirt Date: Tue, 7 Oct 2025 11:19:22 +0200 Subject: [PATCH] feat(proxy): [OCISDEV-342] set referrer-policy to no-referrer Change the Referrer-Policy from 'strict-origin-when-cross-origin' to 'no-referrer' to enhance user privacy and security. Previously, the origin was sent on cross-origin requests. This change completely removes the Referrer header from all outgoing requests, preventing any potential leakage of browsing information to third parties. This is a more robust approach to protecting user privacy. --- .../enhancement-set-referrer-policy-to-no-referrer.md | 11 +++++++++++ services/proxy/pkg/middleware/security.go | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/enhancement-set-referrer-policy-to-no-referrer.md diff --git a/changelog/unreleased/enhancement-set-referrer-policy-to-no-referrer.md b/changelog/unreleased/enhancement-set-referrer-policy-to-no-referrer.md new file mode 100644 index 00000000000..acfdbf502e6 --- /dev/null +++ b/changelog/unreleased/enhancement-set-referrer-policy-to-no-referrer.md @@ -0,0 +1,11 @@ +Enhancement: Set Referrer-Policy to no-referrer + +Change the Referrer-Policy from 'strict-origin-when-cross-origin' +to 'no-referrer' to enhance user privacy and security. + +Previously, the origin was sent on cross-origin requests. This change +completely removes the Referrer header from all outgoing requests, +preventing any potential leakage of browsing information to third parties. +This is a more robust approach to protecting user privacy. + +https://github.com/owncloud/ocis/pull/11722 diff --git a/services/proxy/pkg/middleware/security.go b/services/proxy/pkg/middleware/security.go index 972b48b64f9..e780d817000 100644 --- a/services/proxy/pkg/middleware/security.go +++ b/services/proxy/pkg/middleware/security.go @@ -59,7 +59,7 @@ func Security(cspConfig *config.CSP) func(h http.Handler) http.Handler { ContentTypeNosniff: true, CustomFrameOptionsValue: "SAMEORIGIN", FrameDeny: true, - ReferrerPolicy: "strict-origin-when-cross-origin", + ReferrerPolicy: "no-referrer", STSSeconds: 315360000, STSIncludeSubdomains: true, STSPreload: true,