Skip to content

Commit f13360a

Browse files
authoredMar 27, 2024··
Fix bug introduced in #1536 (#1544)
* Fix bug introduced in #1536 * Changelog * formatter
1 parent 5cc6fdd commit f13360a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug with CORS options for an array of one string (#1544)

‎src/v2/providers/https.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export function onRequest(
269269
// on the origin header of the request. If there is only one element in the
270270
// array, this is unnecessary.
271271
if (Array.isArray(origin) && origin.length === 1) {
272-
origin = origin[1];
272+
origin = origin[0];
273273
}
274274
const middleware = cors({ origin });
275275

0 commit comments

Comments
 (0)
Please sign in to comment.