Skip to content

Instantly share code, notes, and snippets.

View martinabrahams's full-sized avatar

Martin Abrahams martinabrahams

View GitHub Profile
@martinabrahams
martinabrahams / gist:3646236ed8d978bbfa16a362d95e752d
Created September 12, 2017 06:56 — forked from mediavrog/gist:49c4f809dffea4e00738a7f5e3bbfa59
CORS in Google Cloud Functions for Firebase
const cors = require('cors')({origin: true});
exports.sample = functions.https.onRequest((req, res) => {
cors(req, res, () => {
res.send('Passed.');
});
});