Skip to content

Commit

Permalink
Fix bug introduced in #1536 (#1544)
Browse files Browse the repository at this point in the history
* Fix bug introduced in #1536

* Changelog

* formatter
  • Loading branch information
inlined committed Mar 27, 2024
1 parent 5cc6fdd commit f13360a
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
@@ -0,0 +1 @@
Fix bug with CORS options for an array of one string (#1544)
2 changes: 1 addition & 1 deletion src/v2/providers/https.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export function onRequest(
// 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];
}
const middleware = cors({ origin });

Expand Down

0 comments on commit f13360a

Please sign in to comment.