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

Setting X-XSS-Protection: 1 in response header by default? #1543

Closed
pythonissam opened this issue Jul 22, 2018 · 3 comments
Closed

Setting X-XSS-Protection: 1 in response header by default? #1543

pythonissam opened this issue Jul 22, 2018 · 3 comments

Comments

@pythonissam
Copy link
Contributor

pythonissam commented Jul 22, 2018

I suggest setting X-XSS-Protection: 1 in HTTP response header by default. With this setting, Yesod can force browsers to enable XSS filtering. I think it allows us to enforce Yesod's security.

Putting addHeader into defaultYesodMiddleware or modifying stack-template would work.

@MaxGabriel
Copy link
Member

My understanding is that 1 is the default for all browsers that support it. Though there's a case to be made for using 1; mode=block instead

https://blog.innerht.ml/the-misunderstood-x-xss-protection/
https://markitzeroday.com/headers/content-security-policy/2018/02/10/x-xss-protection.html

@pythonissam
Copy link
Contributor Author

Ah, you're right! Yes, 1; mode=block is what i meant. haha

@StevenXL
Copy link
Member

StevenXL commented Aug 6, 2018

Addressed by #1550.

@StevenXL StevenXL closed this as completed Aug 6, 2018
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

No branches or pull requests

3 participants