com.jimuwd.xian.registry-proxy 1.0.48 → 1.0.49

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.js CHANGED
@@ -199,7 +199,7 @@ async function writeSuccessfulResponse(registryInfo, targetUrl, res, upstreamRes
199
199
  }
200
200
  }
201
201
  }
202
- res.writeHead(upstreamResponse.status, safeHeaders).end(JSON.stringify(data));
202
+ res.writeHead(upstreamResponse.status, { "content-type": contentType }).end(JSON.stringify(data));
203
203
  }
204
204
  else {
205
205
  // 二进制流处理
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.jimuwd.xian.registry-proxy",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
4
4
  "type": "module",
5
5
  "description": "A lightweight npm registry proxy with fallback support",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -266,7 +266,7 @@ async function writeSuccessfulResponse(
266
266
  }
267
267
  }
268
268
  }
269
- res.writeHead(upstreamResponse.status, safeHeaders).end(JSON.stringify(data));
269
+ res.writeHead(upstreamResponse.status, {"content-type": contentType}).end(JSON.stringify(data));
270
270
  } else {
271
271
  // 二进制流处理
272
272
  if (!upstreamResponse.body) {