Skip to content

Commit

Permalink
i18n(zh-cn): Update guides/middleware.mdx (#8581)
Browse files Browse the repository at this point in the history
* i18n(zh-cn): Update `guides/middleware.mdx`

* 更新 middleware.mdx

Co-authored-by: liruifengv <[email protected]>

---------

Co-authored-by: liruifengv <[email protected]>
  • Loading branch information
100gle and liruifengv committed Jun 20, 2024
1 parent 9841be5 commit bbd71cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/docs/zh-cn/guides/middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ i18nReady: true
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';
import { Steps } from '@astrojs/starlight/components';

**中间件**允许你拦截请求和响应,并在即将渲染页面或端点时动态注入行为。对于所有预渲染的页面,这种渲染发生在构建时,但对于按需渲染的页面,这种渲染发生在请求路由时。
**中间件**允许你拦截请求和响应,并在即将渲染页面或端点时动态注入行为。对于所有预渲染的页面,这种渲染发生在构建时,但对于按需渲染的页面,这种渲染发生在请求路由时,这时可以使用 [额外的 SSR 功能如 cookie 和标头](/zh-cn/guides/server-side-rendering/#按需渲染功能特性)

这也允许你通过修改在所有 Astro 组件和 API 端点中可用的 `locals` 对象,设置和共享跨端点和页面的请求特定信息。即使在构建时运行这个中间件时,这个对象也是可用的。

Expand Down

0 comments on commit bbd71cc

Please sign in to comment.