firebase-functions icon indicating copy to clipboard operation
firebase-functions copied to clipboard

fix: prioritize boolean cors value over debug flags

Open stfsy opened this issue 2 years ago • 3 comments

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

stfsy avatar Aug 12 '22 06:08 stfsy

@taeold updated as per suggestion and rebased

stfsy avatar Aug 25 '22 19:08 stfsy

@taeold anything else I can do?

stfsy avatar Sep 11 '22 19:09 stfsy

@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 avatar Sep 11 '22 19:09 stfsy

@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 avatar Dec 15 '22 16:12 colerogers

@colerogers thank you very much 🙂 I ran npm run format and commited+pushed the results

stfsy avatar Dec 15 '22 17:12 stfsy