0
点赞
收藏
分享

微信扫一扫

[前端]跨域相关问题

罗蓁蓁 2022-08-05 阅读 100


1.什么是Origin header

使用跨域url,会报

Missing required request header. Must specify one of: origin,x-requested-with

参考: ​​https://www.jianshu.com/p/ccc4416ea298​​

Origin: ""
Origin: "<schema>://<host>[:port]"
// 例如
Origin: "https://baidu.com"
// 错误示范,包含了路径信息
Origin: "https://baidu.com/"

[前端]跨域相关问题_跨域

 

通过​​https://cors-anywhere.herokuapp.com/​​+your server path可以实现跨域

但是这样只能postman和浏览器可以,React上面会报404

 

2.  什么是跨域

 

举报

相关推荐

0 条评论