Skip to content

Commit

Permalink
Update translation of the cors about cors.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fwqaaq authored Jul 7, 2023
1 parent 78c2338 commit 75bab02
Showing 1 changed file with 2 additions and 2 deletions.
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>

0 comments on commit 75bab02

Please sign in to comment.