Created
May 25, 2012 10:12
-
-
Save komagata/2787112 to your computer and use it in GitHub Desktop.
Add original header into Cordova
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% git diff | |
diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java | |
index 5e2586d..dfbdb44 100755 | |
--- a/framework/src/org/apache/cordova/DroidGap.java | |
+++ b/framework/src/org/apache/cordova/DroidGap.java | |
@@ -562,7 +562,9 @@ public class DroidGap extends Activity implements CordovaInterface { | |
}; | |
Thread thread = new Thread(runnable); | |
thread.start(); | |
- me.appView.loadUrl(url); | |
+ HashMap<String, String> headers = new HashMap<String, String>(); | |
+ headers.put("X-Access-From-Cordova", "true"); | |
+ me.appView.loadUrl(url, headers); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment