problems access-control-allow-origin |
[eluser]Alonso Uribe[/eluser]
I'm using a controller as an API (not using libraries) and when I call that controller data in another application, I have the following error. XMLHttpRequest cannot load http://subdomain.app.com/users/api/details/. Origin http://another-subdomain.app.com is not allowed by Access-Control-Allow-Origin. this is the code: https://github.com/alonsouribe/pruebas Sorry for the English, I'm using a translator.
[eluser]CroNiX[/eluser]
It's a security limitation of AJAX. https://developer.mozilla.org/en-US/docs...ss_control
[eluser]Unknown[/eluser]
Hola Alonso Uribe no se si tal vez ya solucionaste el problema, si no prueba de esta forma <Directory "/usr/lib/php-lib"> Order allow,deny Allow from all Header set Access-Control-Allow-Origin "*" </Directory> colócalo en la configuración de tu apache
[eluser]Alonso Uribe[/eluser]
Muchas gracias, voy a probarlo ahora mismo. Saludos.
[eluser]Alonso Uribe[/eluser]
The problem was solved with the following link: https://github.com/philsturgeon/codeigni.../issues/57 Thanks CroNiX and ChristianD. |
Welcome Guest, Not a member yet? Register Sign In |