![](/img/trans.png)
[英]how to send a post request through http in website that uses https?
[英]Send http request for api that not secure / not https in NEXTJS failed in production
我嘗試向公共 API 發送請求,該請求不在 https 中,但在 HTTP 中很熱。 它在本地主機中一切正常,但是當我將它部署到 https url 中的 vercel 生產構建時。 它給出了一個錯誤。
axios.get('http://api');
如何克服這個?
它可能,但了解風險,看看也搜索“jsonp”或“cors” ajax 以下答案適用於 jQuery 但我相信如果你允許在 Z099FB995346F31C749F6E40DB0F39E 中它應該工作。 Jquery AJAX:沒有“訪問控制允許來源” header 存在於請求的資源上
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.