I've been experimenting with strict routing using express@latest and have found that the following the requests all route to the same path when supplying strict: true to express. This doesn't seem to uphold the docs explanation of Disabled by default, “/foo” and “/foo/” are treated the same by the router..
const express = require('express')
const app = express({ strict: true })
const port = 3022
app.get('/:param?/', (req, res) => res.json(req.params.param));
app.listen(port);
> curl -I http://localhost:3022/
HTTP/1.1 200 OK
> curl -I http://localhost:3022/abc
HTTP/1.1 200 OK
> curl -I http://localhost:3022/abc/
HTTP/1.1 200 OK
I've been experimenting with strict routing using
express@latestand have found that the following the requests all route to the same path when supplyingstrict: trueto express. This doesn't seem to uphold the docs explanation ofDisabled by default, “/foo” and “/foo/” are treated the same by the router..