I have a worker that I’d like to run on my front page - If i attach it to a route of “/” it will work fine with no query parameters, however as soon as you add a query parameter like “/?foo” it will no longer trigger.
Normally the solution to this is “/*” however that will send all traffic to this worker… I don’t want to do that. Is there a way around this?
Have you tried
/?* as an additional route?
Infix wildcards & query parameters aren’t supported in Workers’ routes so there isn’t really much you can do to have
/?foo=bar fire but not
Route patterns may not contain infix wildcards or query parameters. For example, neither
example.com/?foo=* are valid route patterns.
That is understandable, yet an upgrade in that regard would be much appreciated.