Skip to content

Commit

Permalink
Fix bug with CORS options for an array of one item for onCall (#1563)…
Browse files Browse the repository at this point in the history
… (#1564)

Co-authored-by: Daniel Lee <danielylee@google.com>
  • Loading branch information
bjester and taeold committed Aug 26, 2024
1 parent e0f786f commit 097b73c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion src/v2/providers/https.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export function onCall<T = any, Return = any | Promise<any>>(
// 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.
Expand Down

0 comments on commit 097b73c

Please sign in to comment.