serveHandler(req, res, {
public: 'public',
cleanUrls: true,
trailingSlash: false,
directoryListing: false,
headers: [
{
source: '**/*.@(jpg|jpeg|gif|png)',
headers: [
{
key: 'Cache-Control',
value: 'max-age=86400'
}
]
},
{
source: '!**/*.@(jpg|jpeg|gif|png)',
headers: [
{
key: 'Cache-Control',
value: 'max-age=0'
}
]
}
]
})
Hi! We have such directories names in our static website
/public/doc/changelog/0.18And when
serve-handlerhandles requests we have 404 for such pages.I found reason - there is false-positive extname checking here https://github.com/zeit/serve-handler/blob/master/src/index.js#L610
But I'm not sure how it should be resolved. Maybe this check can follow next one (where handles
cleanUrl)Our config if it's important