I’m working on a worker that replaces elements with kv stored data, but I’m having some issues with the routing.
Is it possible to only load the worker when there is for example &adid= in the url? When I tried setting this up via the toml file I got a error stating this wasn’t allowed.
And we only need it on some specific pages but the urls are quite dynamic, like prefix/// and we also have urls like prefix///*/ which should remain unaffected. Is that possible?
And last question, if the targeting to query parameter isn’t possible and the routing can’t be specific enough to only target the proper pages, how do I return the right content via the worker? This content can be anything from a PDF to CSS, so I can’t let everything go through HTMLRewriter?