-
Notifications
You must be signed in to change notification settings - Fork 7
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
Capitalize "X-Xss-Protection:" -> "X-XSS-Protection:" #15
Comments
Hey! I think I might be missing something here... I just checked the code and it is properly cased: https://github.com/martini-contrib/secure/blob/master/secure.go#L41 Are you seeing this in the code or the output? |
Thanks, Cory. I'm seeing this in the output. There is no middleware before this, and I am updated to the latest commit (de8e19a) |
Alright, I dug into this a bit more and heres what I found out. Go canonicalizes the header keys automatically for us (whether we like it or not): https://golang.org/src/net/http/header.go#L166
|
Thanks, Cory! Appreciate you digging into this for me. So what's your verdict on this? |
I don't think we can do anything about this. As long as we use Go's |
I'm not so sure about the support for the current capitalization now (
X-Xss-Protection
) in the various browsers; I think it shouldnt be a problem if we trust them to follow the HTTP spec properly (HTTP Header names are case-insensitive)... but it'd still be nice to capitalize it properly toX-XSS-Protection
:XSS
is an acronymX-XSS-Protection
as wellThe text was updated successfully, but these errors were encountered: