-
Notifications
You must be signed in to change notification settings - Fork 10
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
ETag is not removed #9
Comments
Investigating this now. |
I can't reproduce this. Do you possibly have another middleware after |
@cressie176 Can you reproduce this problem? |
Trying now |
Thanks for investigating. Sample project demonstrating the issue here... |
I suspect the problem is that app.use is defined before the route, so the ETag is added after nocache middleware is run. Moving app.use after the route won't help since it doesn't call next, and nocache won't be run at all. |
When you call app.disable('etag') This should solve your problem! |
Hi Evan, Thanks for responding. I know about Given that nocache does not (and cannot) do what it says on the tin without wrapping the send function in a similar way to express-winston, I'd suggest deprecating this config option - it's misleading. |
@cressie176 To selectively remove the etag header for certain responses you may use: var onHeaders = require('on-headers');
onHeaders(res, function () {
this.removeHeader('ETag');
});
@EvanHahn As far as I can tell the current implementation of the |
I do agree that it's misleading. We should deprecate this option. See #10. |
The text was updated successfully, but these errors were encountered: