Skip to content

[Security] Change Referrer-Policy default to strict-origin-when-cross-origin#512

Open
anthonyroussel wants to merge 1 commit intodigitalocean:masterfrom
anthonyroussel:fix/referrer-policy-default
Open

[Security] Change Referrer-Policy default to strict-origin-when-cross-origin#512
anthonyroussel wants to merge 1 commit intodigitalocean:masterfrom
anthonyroussel:fix/referrer-policy-default

Conversation

@anthonyroussel
Copy link
Copy Markdown

@anthonyroussel anthonyroussel commented Apr 3, 2026

Type of Change

  • Tool Source: Vue Nginx default security configuration

What issue does this relate to?

No GitHub issue related, PR opened directly.

What should this PR do?

  • Fix the default Referrer-Policy header value: no-referrer-when-downgrade sends the full URL (including path and query string) as the Referer header to any HTTPS destination, potentially leaking sensitive data (tokens, IDs, search terms) to third-party servers (external pages referenced, iframe, external images, third-party scripts, fonts, and external XHR HTTP requests to third party API for example)
  • Change the default to strict-origin-when-cross-origin, which only sends the origin on cross-origin requests (default value on browsers)

What are the acceptance criteria?

  • The generated nginx config uses strict-origin-when-cross-origin as the default Referrer-Policy value when no custom value is selected
  • no-referrer-when-downgrade remains available as an option in the dropdown
  • no-referrer-when-downgrade is no longer the pre-selected default in the UI
  • The default configuration does not leak the full URL (path + query string) to cross-origin third parties

Sources


  1. I also plan to review the other default headers and check with OWASP recommended and secure defaults, later.

`no-referrer-when-downgrade` leaks full URLs (path + query string) to
cross-origin third parties. `strict-origin-when-cross-origin` only sends
the origin on cross-origin requests, which is the modern secure default.
@anthonyroussel anthonyroussel changed the title Change Referrer-Policy default to strict-origin-when-cross-origin [Security] Change Referrer-Policy default to strict-origin-when-cross-origin Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant