Closed thymusvulgaris closed 1 year ago
You can have a plug that executes before the matching that strips the extension if you want. It won't be done out of the box because we simply compile to Elixir's pattern matching and Elixir's pattern matching can only match prefixes.
Plug will match a request path with an extension, for example:
to a route with no extension, for example:
To elaborate, given the following Plug:
The following expression matches (Elixir version 1.14.3):
This is also confirmed with the following Router change and added test (to v1.14.2), which passes:
Is there an option that allows compilation of the route
"/2/:bar"
such that it does not match request paths with extensions? The option should enable the following test to pass, given the above change: