简体   繁体   中英

PHP Proxy as middleware

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 origin 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM