Skip to content

Commit

Permalink
Set enableCors debug feature when emulating CF3 functions. (#4528)
Browse files Browse the repository at this point in the history
Accompanies firebase/firebase-functions#1099.

With this change, users using the supported version of the Firebase Functions SDK will be able to bypass existing/default cors settings to call the emulated HTTP/callable v2 functions.
  • Loading branch information
taeold committed May 6, 2022
1 parent 6b571ed commit 68ad666
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/emulator/functionsEmulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,10 @@ export class FunctionsEmulator implements EmulatorInstance {
envs.FUNCTIONS_EMULATOR = "true";
envs.TZ = "UTC"; // Fixes https://github.com/firebase/firebase-tools/issues/2253
envs.FIREBASE_DEBUG_MODE = "true";
envs.FIREBASE_DEBUG_FEATURES = JSON.stringify({ skipTokenVerification: true });
envs.FIREBASE_DEBUG_FEATURES = JSON.stringify({
skipTokenVerification: true,
enableCors: true,
});
// TODO(danielylee): Support timeouts. Temporarily dropping the feature until we finish refactoring.

// Make firebase-admin point at the Firestore emulator
Expand Down

0 comments on commit 68ad666

Please sign in to comment.