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

    help - confirm behaviourWalk through the example/issue and confirm this is a general behaviour, or a correct update to make.improve or update documentationEnhance / update existing documentation (e.g. add example, improve description, update for changes)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions