Hello!
Try using vue js pass in the backend:
...
axios.post('https://mysite.ru', dataSend, {
headers: {
'Content-Type': 'application/json',
Accept: 'application/json'
}
})
...
Phalcon:
...
$app->response
->setHeader("Access-Control-Allow-Origin", '*')
->setHeader("Access-Control-Allow-Methods", 'GET,PUT,POST,DELETE,OPTIONS')
->setHeader("Access-Control-Allow-Headers", '*')
->setHeader("Access-Control-Allow-Credentials", true)
->send();
...
I get the error:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
unless the request to remove the content-type is no error. what is the problem?