I want a cross domain communication from my site to the backend at App Engine with the Channel . Is this possible and if so how? Because there is no domain parameter in the Javascript API
Asked
Active
Viewed 612 times
1 Answers
5
Yes you can... I'm doing this myself. you dont need to do anything fancy, just include the /_ah/channel/jsapi script from the domain of the app-engine app, and it should work
EXAMPLE: from http://mysite.com/index.html
<head>
<script language="javascript" type="text/javascript" src="http://myapp.appspot.com/_ah/channel/jsapi"></script>
</head>
then use the Channel API normally https://developers.google.com/appengine/docs/python/channel/javascript

Nicholas Franceschina
- 6,009
- 6
- 36
- 51
-
related: http://stackoverflow.com/questions/10714958/how-do-i-turn-off-the-console-logging-in-app-engine-channel-api/ – Nicholas Franceschina Jun 04 '12 at 01:22
-
4This solution doesn't work for me (GAE Python 1.7.0 development) -- didn't try live yet. I managed to get it working on by manually replacing the BASE_URL: `goog.appengine.Socket.BASE_URL = "http://localhost:8080/" + goog.appengine.Socket.BASE_URL;` – Claude Jul 10 '12 at 13:32
-
@mohabitar First thing after loading the /_ah/channel/jsapi script – Claude Nov 07 '12 at 08:07
-
Both solutions don't seems to work. :-( Maybe something is changed in the framework? Or is this solution still valid? – Peter Fortuin Jun 28 '16 at 12:26