-
Notifications
You must be signed in to change notification settings - Fork 156
Chrome
When developing locally (loading your app from a file:/// URL), Chrome will not allow you to make any XHR requests. This means some require
and all Batman.Request
statements won't work. This only applies to Chrome and development--it will work fine (respecting the Same Origin Policy) in production. This behavior is different than all other browsers; if you wish to have this changed, please add your support to this ticket. In the meantime, there are two workarounds for the issue:
-
Start Chrome with a command line switch
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files
-
Develop your app from http:// instead of file:///
You'll need to run a web server to serve your app from http://. As long as your app follows the Same Origin Policy, your requests will work again. If you have the Batman tools installed, this is all you need to do (and you should probably be doing this anyway): cd MyApp batman server => Batman is now fighting crime at http://127.0.0.1:1047