Created
June 21, 2012 18:29
-
-
Save kara-ryli/2967608 to your computer and use it in GitHub Desktop.
Avoid an OPTIONS request when using DataSource.IO with CORS headers
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
| YUI().use("datasource-io", function (Y) { | |
| // Described in YUI 3.3.0's patch notes | |
| // http://yuilibrary.com/projects/yui3/wiki/ReadMe/RollUp_3.3.0?version=3 | |
| // | |
| var ds = new Y.DataSource.IO({ | |
| source: "http://www.example.com/", | |
| ioConfig: { | |
| headers: { | |
| "X-Requested-With": "disable" | |
| } | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment