Welcome Guest, Not a member yet? Register   Sign In
problems access-control-allow-origin
#1

[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.
#2

[eluser]Alonso Uribe[/eluser]
Any idea?
#3

[eluser]CroNiX[/eluser]
It's a security limitation of AJAX.

https://developer.mozilla.org/en-US/docs...ss_control
#4

[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
#5

[eluser]Alonso Uribe[/eluser]
Muchas gracias, voy a probarlo ahora mismo.
Saludos.
#6

[eluser]Alonso Uribe[/eluser]
The problem was solved with the following link:

https://github.com/philsturgeon/codeigni.../issues/57

Thanks CroNiX and ChristianD.





Theme © iAndrew 2016 - Forum software by © MyBB