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

Helmet only works with Express, not Connect #18

Closed
EvanHahn opened this issue Oct 1, 2013 · 3 comments
Closed

Helmet only works with Express, not Connect #18

EvanHahn opened this issue Oct 1, 2013 · 3 comments

Comments

@EvanHahn
Copy link
Member

EvanHahn commented Oct 1, 2013

Should just be a matter of calling res.setHeader instead of res.header.

EvanHahn added a commit that referenced this issue Nov 28, 2013
Addresses #18 but only for the iexss middleware. More to come.
EvanHahn added a commit that referenced this issue Nov 28, 2013
Addresses #18 but only for this middleware.
EvanHahn added a commit that referenced this issue Nov 28, 2013
Addresses #18 but only for this middleware.
EvanHahn added a commit that referenced this issue Nov 28, 2013
Addresses #18 but only for this middleware.
@hb9cwp
Copy link

hb9cwp commented Mar 26, 2014

Indeed, after replacing res.header by res.setHeaderin lib/middleware/cacheControl.js, contentTypeOptions.js, csp.js, iexss.js, xframe.js, helmet works OK also with Connect.js 3.0.0-rc.1. Thanks!

Edit: This applies to v0.1.2 as currently available on npmjs.org.

@hb9cwp
Copy link

hb9cwp commented Mar 27, 2014

Actually, in the master branch, there is only one instance left of res.header in lib/middleware/csp.jsthat requires replacement by res.setHeader. In the other ,js files, this has been done. Then, the module works with Connect.js 3.0.0-rc1 :-)

@EvanHahn
Copy link
Member Author

All done!

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