Can I use glob or regex in serveStatic
exclude
option ?
router.get('/scripts/:file', ({ serveStatic }) => {
serveStatic('path/to/scripts', {
permanent: true, // ensure that files are permanently accessible, even after a new version of the site has been deployed.
exclude: ['some-non-versioned-file.js'], // you can exclude specific files from being served permanently. You should do this for any files that do not have a hash of the content in the name.
})
})