Falcon.SugarApi/Falcon.SugarApi/FalconCors/Readme.md

8 lines
361 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## cors源认证
组件可以通过注册自己的cors源认证方法来实现访问的控制。
插件可以通过IServiceCollection.AddCoreWithOptions方法注册自己跨域请求策略。
然后在控制器中使用EnableCorsAttribute特性标记特性使用该策略。
如果不使用自己的策略apiservice平台允许所有跨域请求。