Pregunta

I use ajax to send/receive some data with jQuery, In chrome I will get some errors when I use Ajax and I searched in StackOverflow and I found I should add header('Access-Control-Allow-Origin: *'); and because I have a custom header in my jQuery code, I added header('Access-Control-Allow-Headers: Origin, X-TokenCode'); to my php code.

but after adding this headers my sessions not work!

what should I do ?

UPDATE:

Domain name is the same

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top