Created
March 1, 2013 15:46
-
-
Save amessinger/5065501 to your computer and use it in GitHub Desktop.
A policy to allow CORS responses on your sailsjs-based (or express) API.
This file contains 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
module.exports = function (req, res, next) { | |
res.header("Access-Control-Allow-Origin", "*"); | |
res.header("Access-Control-Allow-Headers", "X-Requested-With"); | |
next(); | |
} |
pierredewilde
commented
Dec 4, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment