سؤال

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

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top