docs
docs copied to clipboard
Vercel edge middleware (incorrectly*) documented to run on static files
📚 Subject area/topic
Vercel adapter edge middleware feature
📋 Page(s) affected (or suggested, for new content)
https://docs.astro.build/en/guides/integrations-guide/vercel/#running-astro-middleware-on-vercel-edge-functions
📋 Description of content that is out-of-date or incorrect
When edgeMiddleware is enabled, an edge function will execute your middleware code for all requests including static assets, prerendered pages, and on-demand rendered pages.
This does not appear to be true in my testing. Like other middleware it appears to only run on on-demand pages. See https://github.com/withastro/astro/issues/10536#issuecomment-2291466488
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
This is a tricky one but I can put something together if necessary