We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
setIf
setIf has been deprecated and will be removed in hsts@3 and helmet@4.
hsts@3
helmet@4
Luckily, the transition is relatively painless—simply do the conditional yourself.
Old:
app.use(hsts({ maxAge: 123, setIf(req, res) { return req.secure } }))
New:
const hstsMiddleware = hsts({ maxAge: 123 }) app.use((req, res, next) { if (req.secure) { hstsMiddleware(req, res, next) } else { next() } })
The text was updated successfully, but these errors were encountered:
Deprecate setIf
d4af46d
See <https://github.com/helmetjs/hsts/issues/22>.
Drop support for Node <8; change maxAge: null behavior; remove deprec…
2cb4cc5
…ated options Closes #21. Closes #22. Closes #26.
9323213
Addressed in 788d69b. To be released in version 4 (see #197).
Sorry, something went wrong.
EvanHahn
Successfully merging a pull request may close this issue.
setIf
has been deprecated and will be removed inhsts@3
andhelmet@4
.Luckily, the transition is relatively painless—simply do the conditional yourself.
Old:
New:
The text was updated successfully, but these errors were encountered: