We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f766bb0 commit 13526aaCopy full SHA for 13526aa
forcetk.js
@@ -57,10 +57,13 @@ if (forcetk.Client === undefined) {
57
if (location.protocol === 'file:' || location.protocol === 'ms-appx:') {
58
// In PhoneGap
59
this.proxyUrl = null;
60
- } else {
+ } else if (location.hostname.indexOf('force.com')>-1){
61
// In Visualforce - still need proxyUrl for Apex REST methods
62
this.proxyUrl = location.protocol + "//" + location.hostname
63
+ "/services/proxy";
64
+ } else {
65
+ //This means we are running locally, or on an external server, and we have CORS enabled (hopefully)
66
+ this.proxyUrl=null;
67
}
68
this.authzHeader = "Authorization";
69
} else {
0 commit comments