Make express.static use the "etag" application setting
- Dominant language
- JavaScript
- Stars
- 69.5k
- Forks
- 25k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
I saw this feature on the 5.0 roadmap #2237 and I initially thought that it would need to be implemented in the serve-static module (https://github.com/expressjs/serve-static/pull/64). I think maybe I had misunderstood the use case as the comments I received there were that the changes needed to be made in express.
So after getting it wrong the first time I wanted to open this issue as a discussion item around the requirements for this feature and how best to implement it.
I think now the use case is this:
``` js
var express = require('express');
var app = express();
app.disable('etag');
app.use(express.static('/static')); // also disables etag without needing {'etag':false}
```
So if etags are disabled **before** express.static is called then they are also disabled for static content.
Does this make sense? Any comments appreciated.
Contributor guide
Assessment
This issue has not been assessed yet.