Harazi / range

Middleware for serving static files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cache-control header isn't sent when `maxAge` value is 0

Harazi opened this issue · comments

If you specify 0 as the maxAge value in the options object, the header won't get send.

That's because it will check for truthy values to determine if the header should be set or not.

https://github.com/Ceicc/range/blob/3957f7c30741919ce8e89082e1a4373d5e1b256b/index.js#L171