I have a website which is on HTTPS, and I want to make a GET request to an HTTP port. At the moment when I try I get these errors:
cannot load ${url} due to access control checks.
this page was not allowed to display insecure content from ${http-url}
I have thought about putting the request in an AWS lambda function and calling the labmda function because that will give me an HTTPS URL? Is this possible.
Even so, I want to know what the easiest way of doing it is, as I don't know much about AWS so I would have to learn it.
const url = 'http://website/fmi/xml/fmresultset.xml?-dbnames';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function (params) {
console.log(xhttp.status);
if (xhttp.readyState ==4) {
if (xhttp.status == 200) {
console.log('====');
console.log(xhttp.responseText);
}
}
}
xhttp.open("GET", url, true);
xhttp.send();