I need help serving a 400 error for specific files within the /assets
directory that contain .map
in their names. For example:
/assets/foo-huh4hv45gvfcdfg.map.js
.
Here's the code I tried, but it didn't work as expected:
app.get('/assets\/.*map$/', (req, res) => {
res.status(400).send()
})
I suspect there might be an issue with my regular expression?