Require security token when calling CallbackServer via XHR.

This commit is contained in:
Bryce Curtis
2010-10-29 10:53:59 +08:00
parent 2e5d6f5b74
commit f7254044ee
2 changed files with 51 additions and 29 deletions
+4 -1
View File
@@ -578,6 +578,9 @@ PhoneGap.run_command = function() {
};
PhoneGap.JSCallbackPort = CallbackServer.getPort();
PhoneGap.JSCallbackToken = CallbackServer.getToken();
/**
* This is only for Android.
*
@@ -623,7 +626,7 @@ PhoneGap.JSCallback = function() {
}
}
xmlhttp.open("GET", "http://127.0.0.1:"+CallbackServer.getPort()+"/" , true);
xmlhttp.open("GET", "http://127.0.0.1:"+PhoneGap.JSCallbackPort+"/"+PhoneGap.JSCallbackToken , true);
xmlhttp.send();
};