记得之前项目需要跨域 php 程序里写 header
access-control-allow-origin: *
chrome console 会报错,大概说 必须明确写明允许哪个 origin ( http://origin-domain) 星号的写法即将被抛弃啥的
刚才在阿里云的 cdn 里试了试 直接在后台配置 http response header 里设置 allow-origin:*, allow-headers:* 居然可以正常在 chrome 里使用,跨域都没问题,也没发起 options 请求 这是什么神奇原理?
chrome 版本:83.0.4103.116
access-control-allow-origin: *
chrome console 会报错,大概说 必须明确写明允许哪个 origin ( http://origin-domain) 星号的写法即将被抛弃啥的
刚才在阿里云的 cdn 里试了试 直接在后台配置 http response header 里设置 allow-origin:*, allow-headers:* 居然可以正常在 chrome 里使用,跨域都没问题,也没发起 options 请求 这是什么神奇原理?
chrome 版本:83.0.4103.116