Open pfumagalli opened 10 years ago
Alternatively, you can do this:
new static.Server(pathToServe, {
headers: {
'cache-control': 'no-cache'
}
});
That will override the cache headers, and is a publicly documented API. I believe that's why nobody cares about this issue.
Provide a way to support
Cache-Control: no-cache
or other custom caching informations. Here's a patch:Basically this is what it produces:
.../static --cache=no-cache
producesCache-Control: no-cache
.../static --cache
producesCache-Control: max-age=3600
.../static --cache=-1
producesCache-Control: no-cache
.../static --cache=true
producesCache-Control: max-age=3600
.../static --cache=false
producesCache-Control: no-cache
.../static --cache=1234
producesCache-Control: max-age=1234
.../static --cache=foo-and-bar
producesCache-Control: foo-and-bar