Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation tag displayed when using multiple referrer-policy values #1665

Open
WKobes opened this issue Feb 17, 2025 · 5 comments
Open

Translation tag displayed when using multiple referrer-policy values #1665

WKobes opened this issue Feb 17, 2025 · 5 comments

Comments

@WKobes
Copy link
Collaborator

WKobes commented Feb 17, 2025

See: https://internet.nl/site/github.com/3159118/#control-panel-30

Multiple referrer-policy values is valid: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy

@WKobes
Copy link
Collaborator Author

WKobes commented Feb 17, 2025

@WKobes
Copy link
Collaborator Author

WKobes commented Feb 17, 2025

@bwbroersma
Copy link
Collaborator

bwbroersma commented Feb 17, 2025

Very interesting how this crashes with github.com, and when it does not:
https://dev-docker.internet.nl/site/kpsauqxtrrbf5prozsbxqjib.v1.b6a.nl/31737/#control-panel-30

$ curl https://github.com/ -sSfI --http1.1 | grep -i referrer
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin

Isn't this plain invalid?

Related:

@WKobes
Copy link
Collaborator Author

WKobes commented Feb 17, 2025

@bwbroersma in your example there is no finding and therefore no translation tag. See for example:
https://internet.nl/site/kpcpadabe7vrb4uslye3aeaaaa.v1.b6a.nl/3159214/#control-panel-30

@bwbroersma
Copy link
Collaborator

Check, to conclude: the Referrer-Policy can be multiple value, which also means multiple headers are combined to one list of directives, where the last (valid) directive is picked, see the two samples below with 3 directives in 2 headers.

✅ Referrer-Policy ['origin-when-cross-origin', 'strict-origin-when-cross-origin', 'no-referrer'] (🪄 reverse / 🪄 input)
❌ Referrer-Policy ['no-referrer', 'origin-when-cross-origin', 'strict-origin-when-cross-origin'] (🪄 reverse / 🪄 input)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants