denoland / fresh

The next-gen web framework.
https://fresh.deno.dev
MIT License
12.67k stars 654 forks source link

Feature request: More configurable route overrides #1334

Open spencersolberg opened 1 year ago

spencersolberg commented 1 year ago

Currently, you can override routing using the routeOverride property in RouteConfig, but I can only specify the path I want to override. This doesn't allow access to many of the options available in URLPattern, such as case insensitivity, or hostname matching. I think it would be nice if I could construct the URLPattern myself, and use that in the routeOverride property. The option to just provide the path string could remain.

kamilogorek commented 1 year ago

This might be tricky to implement with the current architecture, as the pattern itself is used as the key in the Routes map.