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

Duplicate headers #1348

Open
dennisbaaten opened this issue Mar 20, 2024 · 4 comments
Open

Duplicate headers #1348

dennisbaaten opened this issue Mar 20, 2024 · 4 comments

Comments

@dennisbaaten
Copy link
Contributor

When headers occur more than once, domains currently pass the test. Other testing platforms (Mozilla Observatory and Security Headers) seem to reject this. We should like into this and decide how we want to deal with such scenario's. @mxsasha stated that it's customary to use the last header in case there are duplicates.

@dennisbaaten
Copy link
Contributor Author

Probably related to:
#1023
#1199
#1038

@bwbroersma
Copy link
Collaborator

Depends on the spec, I see the double headers mainly with HSTS (with of course a preload only on the www). In those cases I think it should be valid, but with ⚠️ warning since it's a clear misconfiguration (same as HSTS on http). In case of CSP it's actually valid to have multiple CSP headers (although an ℹ️ info would be nice): 8.1. The effect of multiple policies - Content Security Policy Level 3 - W3C.

@dennisbaaten
Copy link
Contributor Author

The person that reported the issue stated the following:

Last week, we had an issue and several headers were duplicated (X-Content-Type-Options and X-Frame-Options).
Sites like Mozilla Observatory and Security Headers were complaining but Internet.nl was still showing these headers as good / green. Might be something to check.

@bwbroersma
Copy link
Collaborator

bwbroersma commented Mar 20, 2024

Looks like multiple X-Frame-Options are allowed (and the first one is used), see 7.6 The X-Frame-Options header.
I cannot find any documentation about double X-Content-Type-Options headers.

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