FilledStacks / FilledStacks/firebase-backend
Add Cors options for Restful Endpoints
- Dominant language
- TypeScript
- Stars
- 61
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
The package uses the express router. We should probably be able to enable CORS like in Google's example:
https://firebase.google.com/docs/functions/http-events#using_existing_express_apps
Or somehow be able to define CORS configuration for each function / route:
https://github.com/expressjs/cors#enable-cors-for-a-single-route
This can be implemented either or in both ways but it is something that will be required. I don't know the security concerns with setting cors enabled to true for all functions so:
- We should default to cors enabled false
- Add an option to the function parser to set the default true for all Restful functions.
This will make it so that the devs that want it on for everything can do that, the ones that don't won't have to change anything.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.