Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update translation of the cors about cors.md #18

Merged
merged 1 commit into from
Jul 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/zh-hans/book/middlewares/cors.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CORS

CORS 中间件可以用于 [跨域资源共享](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CORS).
CORS 中间件可以用于 [跨源资源共享](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CORS).

由于浏览器会发 `Method::OPTIONS` 的请求, 所以需要增加对此类请求的处理. 可以对根 `Router` 添加 `empty_handler` 一劳永逸地处理这种情况.

Expand All @@ -18,4 +18,4 @@ _**示例代码**_
@[code toml](../../../../codes/cors/Cargo.toml)

</CodeGroupItem>
</CodeGroup>
</CodeGroup>