Last active
August 16, 2020 18:47
-
-
Save taishikato/3473dc22a15327127189743acdfe8485 to your computer and use it in GitHub Desktop.
How to use CORS with TypeScript on Firebase Cloud Functions π₯
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
import * as cors from 'cors'; | |
const corsHandler = cors({origin: true}); | |
export const createPaymentIntent = functions.https.onRequest((req, res) => { | |
corsHandler(req, res, () => { | |
res.send('Success'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment