We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cc6fdd commit f13360aCopy full SHA for f13360a
CHANGELOG.md
@@ -0,0 +1 @@
1
+Fix bug with CORS options for an array of one string (#1544)
src/v2/providers/https.ts
@@ -269,7 +269,7 @@ export function onRequest(
269
// on the origin header of the request. If there is only one element in the
270
// array, this is unnecessary.
271
if (Array.isArray(origin) && origin.length === 1) {
272
- origin = origin[1];
+ origin = origin[0];
273
}
274
const middleware = cors({ origin });
275
0 commit comments