You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relevant PR, the description of the PR has instructions of how to install the preview release;
A middleware unlocks two major things:
do various operations based on the Request and Response, and also modify the Response before being rendered; a user can also return a newResponse;
store contextual information inside a new global called Astro.locals/context.locals (they're the same object), and then render something based on this Astro.locals;
The text was updated successfully, but these errors were encountered:
sarah11918
added
the
add new content
Document something that is not in docs. May require testing, confirmation, or affect other pages.
label
May 2, 2023
The platform team is about the add a new feature in
astro
. The feature is called "Astro middleware".Few useful links:
A middleware unlocks two major things:
Request
andResponse
, and also modify theResponse
before being rendered; a user can also return a newResponse
;Astro.locals
/context.locals
(they're the same object), and then render something based on thisAstro.locals
;The text was updated successfully, but these errors were encountered: