跨域解決方案

設置響應頭:跨域

容許跨域的域ide

Access-Control-Allow-Origin: http://foo.example get

 

容許跨域執行的方法方法

Access-Control-Allow-Methods: POST, GET, OPTIONSdeveloper

 

容許跨域設置的頭信息co

Access-Control-Allow-Headers: X-PINGOTHER中文

 

容許訪問Cookiesps

Access-Control-Allow-Credentials: truetar

 

 

參考:

https://developer.mozilla.org/En/HTTP_access_control

https://developer.mozilla.org/En/Server-Side_Access_Control 

中文:

https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Access_control_CORS 

https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Server-Side_Access_Control 

相關文章
相關標籤/搜索