开发者

PHP Proxy as middleware

开发者 https://www.devze.com 2023-04-03 09:21 出处:网络
I have created a proxy page for calling xml from javascript client. I have placed header(\'Access-Control-Allow-Origin: *\');

I have created a proxy page for calling xml from javascript client. I have placed

 header('Access-Control-Allow-Origin: *');
 header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
 header('Cache-Control: no-cache');
 header('Pragma: no-cache');
 //header('Access-Control-Allow-Credentials: false');
 $header[] = "Content-type: text/xml";

But when I m calling though jquery or any other framework it is still showing me access o开发者_如何学Pythonrigin issue. PHP file i have placed in different domain.

How to I can solve this problem?


Are you cached? Clear it and try again.

If it is showing the php file in the other domain and the CORS page is not redirecting, it should have no problems as long as the browser supports it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号