livebud / bud

The Full-Stack Web Framework for Go
MIT License
5.53k stars 181 forks source link

Relax router inputs and remove automatic redirects. #308

Closed matthewmueller closed 1 year ago

matthewmueller commented 1 year ago

This PR allows the router to define routes that are uppercase, but get converted into case-insensitive routes when inserted into the radix tree.

Additionally, instead of erroring out on trailing slashes, we trim trailing slashes.

Finally, instead of redirecting trailing slashes to the non-trailing slash variant, we'll expect folks to use the canonical meta tag to avoid distinct pages of the same content showing up in their analytics.

The reason for doing this now is to expose the chunk names in ESBuild which use a hash of uppercase characters.