CORS 错误
什么是 CORS?
🌐 What is CORS?
跨源资源共享(CORS) 是一种机制,浏览器和网页视图——如驱动 Capacitor 和 Cordova 的那些——用来限制脚本对不同源的资源发起的 HTTP 和 HTTPS 请求,以出于安全原因,主要是为了保护用户的数据并防止可能危及你的应用的攻击。
为了知道外部来源是否支持 CORS,服务器必须发送一些 特殊头,以便浏览器允许这些请求。
🌐 In order to know if an external origin supports CORS, the server has to send some special headers for the browser to allow the requests.
源是指提供你的 Ionic 应用或外部资源的协议、域名