@xeno-js/core 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3644,11 +3644,32 @@ var MiddlewareModule = class {
|
|
|
3644
3644
|
}
|
|
3645
3645
|
_buildOptionsMiddleware(opts, requestContext, allowMethod, withCredentials, routePolicyCheck) {
|
|
3646
3646
|
if (import_shared92.Guards.isDefined(opts.cors?.enablePreflight) && opts.cors?.enablePreflight) {
|
|
3647
|
+
const allowHeaders = Array.from(
|
|
3648
|
+
/* @__PURE__ */ new Set([
|
|
3649
|
+
"x-csrf-token",
|
|
3650
|
+
"Authorization",
|
|
3651
|
+
"Content-Type",
|
|
3652
|
+
"X-Requested-With",
|
|
3653
|
+
"Accept",
|
|
3654
|
+
"Origin",
|
|
3655
|
+
"referer",
|
|
3656
|
+
"x-correlation-id",
|
|
3657
|
+
"x-request-id",
|
|
3658
|
+
"x-span-id",
|
|
3659
|
+
"x-parent-span-id",
|
|
3660
|
+
"x-return-address",
|
|
3661
|
+
"x-sequence-id",
|
|
3662
|
+
"x-sequence-position",
|
|
3663
|
+
"x-sequence-size",
|
|
3664
|
+
"x-expiration",
|
|
3665
|
+
...opts.cors.allowHeaders ?? []
|
|
3666
|
+
])
|
|
3667
|
+
);
|
|
3647
3668
|
return new OptionsMiddleware(
|
|
3648
3669
|
requestContext,
|
|
3649
3670
|
allowMethod(),
|
|
3650
3671
|
routePolicyCheck,
|
|
3651
|
-
|
|
3672
|
+
allowHeaders,
|
|
3652
3673
|
withCredentials
|
|
3653
3674
|
);
|
|
3654
3675
|
}
|