@lark-apaas/fullstack-rspack-preset 1.0.13-alpha.proxy.4 → 1.0.13-alpha.proxy.7

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.
@@ -31,13 +31,11 @@ function registerSnapDomProxyMiddleware(serverApp, options = {}) {
31
31
  catch {
32
32
  targetUrl = decodeURIComponent(targetUrl);
33
33
  }
34
- // 发起请求(无需特殊的跨域配置)
35
34
  const response = await fetch(targetUrl);
36
35
  const contentType = response.headers.get('content-type');
37
36
  if (contentType) {
38
37
  res.setHeader('Content-Type', contentType);
39
38
  }
40
- // 返回内容
41
39
  const buffer = await response.arrayBuffer();
42
40
  res.send(Buffer.from(buffer));
43
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-rspack-preset",
3
- "version": "1.0.13-alpha.proxy.4",
3
+ "version": "1.0.13-alpha.proxy.7",
4
4
  "files": [
5
5
  "lib",
6
6
  "patches",