-
Notifications
You must be signed in to change notification settings - Fork 237
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
docs: improve hertz-cors docs #391
Conversation
c4760fc
to
7e13d89
Compare
@@ -11,35 +11,232 @@ description: > | |||
|
|||
hertz 提供 cors 跨域中间件的[实现](https://github.com/hertz-contrib/cors) ,这里的实现参考了 gin 的 cors,使用方法可参考 gin 的 [cors](https://github.com/gin-contrib/cors) 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要在参考 gin 的了,参考咱自己的吧 :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i got it, thx
|
||
该参数设置为 `true` 之后,将允许来自任意 origin 的客户端跨源访问服务端资源。 | ||
|
||
与 `AllowOriginFunc` 以及 `AllowOrigins` 配置冲突,同时只能配置一项。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所有的冲突加粗一下吧。
或者加个注意也不错
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i got it, thx
|
||
### AllowOriginFunc | ||
|
||
以 origin 为形参,用于自定义的 origin 校验逻辑,返回 `ture` 表示校验通过。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
7e13d89
to
84f6a4a
Compare
What type of PR is this?
docs
What this PR does / why we need it (en: English/zh: Chinese):
en: improve hertz-cors docs
zh: 完善 hertz-cors 的文档