Access to XMLHttpRequest was blocked by CORS policy

0

I'm doing a post this way;

$.post("_checa.php",
{
    inst: 'val'
}, function(data)
{
    console.log(data);
});

It works fine if I use it in http, but when I switch to https, I get the return:

Access to XMLHttpRequest at 'https://www.meusite.com.br/_checa.php' from origin 'https://meusite.com.br' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

In the file _checa.php I left blank to test, and it is returning status 301

    
asked by anonymous 10.12.2018 / 15:30

0 answers