Skip to content

Commit 50149de

Browse files
committed
docs: fix docs meta
1 parent 1efbf5c commit 50149de

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

apps/docs/content/zh-hans/docs/01-app/02-guides/authentication.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,8 +1232,6 @@ export const getUser = cache(async () => {
12321232
> - 对于安全检查,你可以通过将会话 ID 与数据库进行比较来检查会话是否有效。使用 React 的 [cache](https://react.dev/reference/react/cache) 函数避免在渲染过程中重复请求数据库。
12331233
> - 你可能希望将相关的数据请求整合到一个 JavaScript 类中,该类在任何方法之前运行 `verifySession()`
12341234
1235-
</AppOnly>
1236-
12371235
### 使用数据传输对象 (DTO)
12381236
12391237
在检索数据时,建议仅返回应用程序中需要使用的必要数据,而非整个对象。例如,获取用户数据时,可以只返回用户 ID 和姓名,而不是包含密码、电话号码等敏感信息的完整用户对象。

apps/docs/content/zh-hans/docs/01-app/05-api-reference/02-components/image.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,7 @@ module.exports = {
484484
```jsx
485485
<Image onLoadingComplete={(img) => console.log(img.naturalWidth)} />
486486
```
487-
488-
</AppOnly>
487+
</PagesOnly>
489488

490489
<AppOnly>
491490

apps/docs/content/zh-hans/docs/14/02-app/01-building-your-application/09-authentication/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,8 @@ export default function Page() {
442442
443443
设置授权时,必须确保主要安全检查发生在应用访问或更改数据的位置。虽然中间件可用于初始验证,但不应该是保护数据的唯一防线。大部分安全检查应在数据访问层 (DAL) 执行。
444444
445+
<PagesOnly>
446+
445447
### 保护 API 路由
446448
447449
Next.js 中的 API 路由对于处理服务端逻辑和数据管理至关重要。确保这些路由的安全性十分必要,只有经过授权的用户才能访问特定功能。这通常涉及验证用户的认证状态及其基于角色的权限。

0 commit comments

Comments
 (0)