Answer the question
In order to leave comments, you need to log in
Damn headlines not working again?
I get an error
'No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'xxx' is therefore not allowed access. The response had HTTP status code 502.'
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: *');
header('Access-Control-Allow-Methods: *');
header('Access-Control-Request-Headers: *, x-requested-with ');
Answer the question
In order to leave comments, you need to log in
Try like this:
header('Access-Control-Allow-Origin: *', true);
header('Access-Control-Allow-Headers: *', true);
header('Access-Control-Allow-Methods: *', true);
header('Access-Control-Request-Headers: *, x-requested-with ', true);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question