Is it some how possible to send a get request from a https website to a http address with fetch api.
fetch('http://103.82.8.194/Data/', { mode: 'no-cors' })
.then(response => response.json())
.then(data =>
console.log(data)
);
Like is it some how possible send this request from https://rionislam.github.io ?
Thanks...
It's not possible to request http address from a https website directly because of the Mixed Content Security Policy , it'll be blocked by the browser.
You can use a https proxy to do so, something like: https://some-proxy-url?url=http://103.82.8.194/Data/.
or just upgrade http server to https
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.