简体   繁体   中英

HttpRequest blocked mixed content

 BASE_URL = "http://********:8091/api/v1";

I have uploaded my react-js application on.netlify.com. in react js I implemented APIs.... when I hit APIs after deploying I got this error on console:

Mixed Content: The page at 'https://xyz.netlify.app/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http:// * **:8091/api/v1/categories/'. This request has been blocked; the content must be served over HTTPS.

what is the solution to this

Unfortunately, There's no way to disable mixed content

Just Add the Below meta tag to your HTML file

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM