GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
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
Browser sniffing from User-Agent to determine header types
Merge branch 'master' of https://github.com/evilpacket/helmet
fixed hsts setHeader and wrote some tests for hsts
remove secureheaders and csp_browser as legacy old commit stuff. Shou…
…ldn't have been in this PR.
Looks good -- please run JSHint on test/hsts.js, fix those minor indentation issues, and I'll merge.
This doesn't fully resolve #24 -- req.secure is Express-only (run this to test it) -- but it certainly helps!
JSHint run and added "use strict" to make pass.
Don't see any indentation issues getting flagged by JSHint but did yell at me for not including "use strict";
I use indentation 2 in my IDE though, would you like me to switch to 4?
@EvanHahn I also see what you're saying about req.secure now. How can I go about testing both in the same file? I guess I could manually build a mock req object and just have a secure property defined for a 3rd it block.
Yes, switch to 4 spaces. Is it not picking up the jshintrc?
I think we'll probably wind up changing HSTS to be Connect-compatible. I'd leave the tests as they are now, but we'll add more that test Connect-only functionality.
JSHint 4 indent instead of 2. fixed.
@EvanHahn let me know if you need me to do anything else here.
Merge pull request #25 from mattjay/hsts_test
@mattjay Sorry I missed this -- don't think I got a notification. Thanks so much!
👍 👍 👍 Glad to help.
@mattjay I'm making a new website for Helmet.js and I want to credit everyone who's contributed. Do you have a name and/or website you'd like me to use to credit you?
@EvanHahn Matt Johansen - @mattjay on twitter works. Website - mattjay.github.io