Answer the question
In order to leave comments, you need to log in
Why is the request not being sent to a third party server even though the header for CORS is configured?
I'm trying to send a GET request
from a site https://test.com to https://test2.com
$.get("https://test2.com/test.php",
{
firstParametr: '123',
})
.done(function(data) {
alert("Data Loaded: " + data);
});
<?
header("Access-Control-Allow-Origin: https://test.com");
server: nginx/1.20.1
date: Fri, 21 Jan 2022 13:41:59 GMT
content-type: text/html; charset=UTF-8
content-length: 39
connection: keep-alive
access-control-allow-origin: https://test.com
Access to XMLHttpRequest at 'https://test2.com/test.php' from origin 'https://test.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question