@x-9lab/xlab 1.0.10 → 1.0.11

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.
@@ -56,6 +56,10 @@ function _default(config) {
56
56
  ctx.set("Access-Control-Allow-Origin", origin);
57
57
  ctx.set("Access-Control-Allow-Methods", "POST, GET, OPTIONS");
58
58
  ctx.set("Access-Control-Allow-Credentials", "true");
59
+ const acrHeaders = ctx.headers["access-control-request-headers"];
60
+ if (acrHeaders) {
61
+ ctx.set("Access-Control-Allow-Headers", acrHeaders);
62
+ }
59
63
  ctx.set("X-Cors", isLocal ? "local" : config.type || "custom");
60
64
  } else {
61
65
  ctx.set("X-Cors", "disabled");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-9lab/xlab",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "9lab 服务端模块",
5
5
  "versionDesc": "originHost 现在所有请求都会带上",
6
6
  "scripts": {