成长值: 474
签到天数: 4783 天 [LV.Master]伴坛终老
|
发表于 2018/1/6 22:43
|
显示全部楼层
|阅读模式
|![](https://att.itzmx.com/source/plugin/chxs_icons/images/net/chrome.png) Google Chrome 63.0.3239.108 |![](https://att.itzmx.com/source/plugin/chxs_icons/images/os/win-5.png) Windows 10
这个一般最好是php或者源服务器来做,kangle自动支持,当然kangle做也可以,进入回应控制,如下图
attr写- Access-Control-Allow-Origin
复制代码
val填写
针对api动态内容的话,可以写的更加复杂一些,或者使用OPTIONS预检测
- access-control-allow-headers: Accept, Authorization, Cache-Control, Content-Type, DNT, If-Modified-Since, Keep-Alive, Origin, User-Agent, X-Requested-With, Token, x-access-token, Notion-Version
- access-control-allow-methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
- access-control-allow-origin: https://api.itzmx.com
复制代码
|
|