eric-eaststaff
-
10/29/2012 9:56:56 AM
Chat Cross-Domain
I'm using the Chat module with Kentico 6 and I'm having a hard time getting it to work.
Everything seems to be installed fine, and it works when accessing the site locally. When accessing it remotely I was getting a lot of errors, so I set the headers to allow all origins, set the allowed methods header, dealt with the OPTIONS verb, and managed to get rid of all of the errors.
Here's what's going on now: The staging sever is at http://mydomain:8007/chatpage. If I try to log in to chat it will log in and then immediately log out. No javascript errors, fiddler shows all OK, no errors it just fails. Now, if I go to http://www.mydomain:8007/chatpage it works just fine. Fiddler shows that when the chat service is accessed the host is mydomain:8007, not www.mydomain:8007. So it seems to be a problem with this being seen as cross-domain because of the www, but cross-domain access should be allowed.
In production, the situation is similar. The server is at mydomain:8008. If I access it with the URL mydomain:8008 it works fine, but if I use the public URL mydomain it doesn't work. Seems to be a cross-domain problem again, this time with the port number.
Any ideas what's going on here? I've spent tons of time googling cross-domain issues and trying every fix I can find. Now that I'm not getting any errors at all I don't have much to go on. I'm missing something somewhere, if you have any ideas please let me know.
|