Created
December 27, 2018 12:10
-
-
Save shubham7298/d9d565eb11353a0a817bbd1e85ab1c4c to your computer and use it in GitHub Desktop.
CORS in firebase cloud functions
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
const cors = require('cors')({origin: true}); | |
exports.sample = functions.https.onRequest((req, res) => { | |
cors(req, res, () => { | |
res.send('Passed.'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment