Skip to content

chore(middleware): clarify usage#7045

Merged
ematipico merged 3 commits into
mainfrom
chore/clarify-usage-middleware
Feb 28, 2024
Merged

chore(middleware): clarify usage#7045
ematipico merged 3 commits into
mainfrom
chore/clarify-usage-middleware

Conversation

@ematipico
Copy link
Copy Markdown
Member

Description (required)

In core, we have had some feedback where users expected to have the middleware run also in SSG when the website is deployed.

From one point of view, I can understand this. A middleware should run every time, at runtime, because that's what a middleware is meant for. Although, this isn't the case for our static and prerendered pages.

This PR is meant to add a small note to clarify how the middleware works in Astro.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Feb 27, 2024 3:12pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs-i18n ⬜️ Ignored (Inspect) Feb 27, 2024 3:12pm

Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this clarification @ematipico ! See what you think about my suggestion!

Comment thread src/content/docs/en/guides/middleware.mdx Outdated
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
@sarah11918 sarah11918 added the improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) label Feb 27, 2024
Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me @ematipico ! Happy for you to merge when you're happy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants