firebase-functions
firebase-functions copied to clipboard
fix: prioritize boolean cors value over debug flags
Description
As discussed in https://github.com/firebase/firebase-tools/issues/4862 it's not possible to disable cors in v2 functions when running in the emulator, because the emulator enables the debug feature for cors overriding opts.cors
.
If we could prioritize the boolean flag over the debug feature, we could have both: The ability to disable cors and also prioritize the debug flag over user provided configuration.
Code sample
@taeold updated as per suggestion and rebased
@taeold anything else I can do?
@taeold got it now, had to run npm run format:fix
to fix the formatting error. I committed and pushed the changes just a few seconds ago.
@stfsy I fixed your merge conflicts but it looks like you need to run npm run format
one more time before we can merge this.
@colerogers thank you very much 🙂 I ran npm run format
and commited+pushed the results