Skip to content

Vercel edge middleware (incorrectly*) documented to run on static files #11950

@qw-in

Description

@qw-in

📚 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 withastro/astro#10536 (comment)

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

This is a tricky one but I can put something together if necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    improve or update documentationEnhance / update existing documentation (e.g. add example, improve description, update for changes)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions