I am creating a chrome extension that need to send post request to a server over normal http but this causes a mixed content error and browser don't process the request when I am in a website that user Https.
error message:
Mixed Content: The page at 'https://www.google.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://example.se:8080/v1/check'. This request has been blocked; the content must be served over HTTPS.
var settings = {
"url": "http://example.se:8080/v1/check",
"method": "POST",
"timeout": 0,
"headers": {
"postman-token": "e7705111-e7d7-0284-e4cd-56115243e076",
"Content-Type": "application/json"
},
"data": JSON.stringify({"langCode":"pt-rr","text":"Por favor, leia as regrs. Meu nom é Nicolas. bowré o qunto maor pabn dks do."}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});