How configure workers with assets for intercept public/index.html
i have wrangler.toml:
I need to add middleware to request.url == "/"
but static files don't get into the default handler
3 Replies
I am not sure, assets workers do not support middleware yet, if asset to corresponding pathname is found, asset will be served and workers will not be invoked for that pathname.
Cloudflare Docs
Routing | Cloudflare Workers docs
How Workers assets' routing and its configuration works.
Hey @TLENS -- you have your binding set up, so you're halfway there! You can certainly run your middleware in your user worker, and then use the ASSETS binding to fetch your assets.