Saturday 15 May 2010

apache - Ajax Call cross domain -


Hi I am creating an Ajax call cross domain, but on the same machine. In Apache I have created a virtual host and setup ProxyPass and ProxyPassReverse.

When I call my AJAX i.e. it works, but it gives the same value on all subsequent calls, although I know that this value has changed.

In Chrome, I get error generation

  http: // myip is not allowed by access-control-permission-origin   < P> Do I still have some configuration in Apache or do I need to change something in the browser ??  

Thanks for any thoughts

is a technique that is called basic To allow you to cross domain access, a special HTTP helper needs to breathe:

  Access-control-permission-origin: Http: //www.example .com   

If you have installed mod_headers, then you can try to add this line to your HTXus file or server configuration. Header:

  Header Access-Control-Permission-Origin "http://www.example.com"   

If you have normal access to all domains If you want to allow public APIs like, allow all domains with an asterisk:

  header access-control-permission-origin "*"   < / Div> 

No comments:

Post a Comment