#Running workers conditionally
2 messages · Page 1 of 1 (latest)
I don't think you can achieve this with workers, unfortunately - routes matching doesn't have a way to exclude certain requests, so you could either use a transform rule to change the url (eg. add a prefix for html files that your worker route then matches), or use pages where I think you could use the include/exclude feature in _routes.json to achive this: https://developers.cloudflare.com/pages/functions/routing/#create-a-_routesjson-file