How to have case-insensitive worker routing rules?

In the Worker documentation I see that route patterns are case-sensitive:

Route patterns are case sensitive, e.g.* and* are two distinct routes.

However for good SEO I would prefer to 301 redirect any URL containing an uppercase character to all lowercase to avoid the 404 errors currently generated.

For example:

Worker route:*

Current experience: = 404 error

Desired experience: = 301 redirect to

Interested in how you might be working around this issue?

Here is an example for your redirect, adapt to your project:

route =*