prevent incorrect automatic OPTIONS responses
Before adoption: this commit came in with the history the project adopted, so no landing records it.
The router has automatic handling of OPTIONS based on the registered routes, but if you make an OPTIONS request for an endpoint that does not exist, then it will still return a 200 with nothing allowed. Instead, we can let the request move on down the middleware chain. This has two benefits: first, if the route was not defined and no other middleware handles it, it will return with a 404. Secondly, if multiple routers are used and a later one has the route or a custom OPTIONS defined, the first router will not respond incorrectly.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+27 added−2 removed
- tests:+24 added−0 removed
- other:+3 added−2 removed