diff --git a/CHANGELOG.md b/CHANGELOG.md index 11b44ddb9..3e384a131 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ - Fix retry in event triggered functions. (#1463) - Expose retry configuration in v2 RTDB trigger (#1588) +- Fix CORS options for v2 callable functions (#1564) - Remove invalid `enforceAppCheck` option for v2 onRequest trigger (#1477) diff --git a/src/v2/providers/https.ts b/src/v2/providers/https.ts index 37665879d..16ad9038c 100644 --- a/src/v2/providers/https.ts +++ b/src/v2/providers/https.ts @@ -375,7 +375,7 @@ export function onCall>( // on the origin header of the request. If there is only one element in the // array, this is unnecessary. if (Array.isArray(origin) && origin.length === 1) { - origin = origin[1]; + origin = origin[0]; } // onCallHandler sniffs the function length to determine which API to present.