Sessions not work after adding Access-Control-Allow-Headers
Question
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 correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow