跨域 - weex中使用fetch问题
本文介绍了跨域 - weex中使用fetch问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
fetch加上headers就跨域,去掉签名又不正确,有人遇到过这个问题吗?
好像headers里边加什么都加不进去一样
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
[h5-render] unexpected error in _xhr for 'fetch' API
解决方案
url用相对路径就好了
这篇关于跨域 - weex中使用fetch问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文