@octanejs/rsbuild-plugin 0.1.59 → 0.1.60

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/rsbuild-plugin",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -48,20 +48,20 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@octanejs/app-core": "0.1.1",
52
- "@octanejs/rspack-plugin": "0.1.57"
51
+ "@octanejs/app-core": "0.1.2",
52
+ "@octanejs/rspack-plugin": "0.1.58"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@rsbuild/core": "^2.0.0",
56
- "octane": "^0.9.0"
56
+ "octane": "^0.10.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@rsbuild/core": "^2.1.6",
60
60
  "@rsbuild/plugin-react": "2.1.0",
61
61
  "@rspack/core": "^2.1.4",
62
62
  "@types/node": "^24.13.3",
63
+ "octane": "0.10.0",
63
64
  "playwright": "^1.61.1",
64
- "vitest": "^4.1.10",
65
- "octane": "0.9.0"
65
+ "vitest": "^4.1.10"
66
66
  }
67
67
  }
package/src/dev-server.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
  import { createHandler } from '@octanejs/app-core/production';
3
3
  import { createRouter, is_rpc_request } from '@octanejs/app-core';
4
- import { nodeRequestToWebRequest, sendWebResponse } from '@octanejs/app-core/node';
4
+ import { nodeRequestToWebRequest, nodeRequestUrl, sendWebResponse } from '@octanejs/app-core/node';
5
5
 
6
6
  import { isRsbuildOwnedUrl } from './html.js';
7
7
 
@@ -90,8 +90,7 @@ export function createOctaneDevMiddleware(options) {
90
90
 
91
91
  return async function octaneDevMiddleware(request, response, next) {
92
92
  try {
93
- const host = request.headers.host ?? 'localhost';
94
- const url = new URL(request.url ?? '/', `http://${host}`);
93
+ const url = nodeRequestUrl(request);
95
94
  // Internal and public URLs do not depend on a successful client
96
95
  // compilation. Yield them immediately so an initial compile error does
97
96
  // not turn the error overlay, HMR transport, or favicon into an SSR 500.
@@ -146,7 +145,11 @@ export function createOctaneDevMiddleware(options) {
146
145
  handlerCache.set(typedBundle.manifest, cached);
147
146
  }
148
147
 
149
- const webResponse = await cached.handler(nodeRequestToWebRequest(request, response));
148
+ const webResponse = await cached.handler(
149
+ nodeRequestToWebRequest(request, response, {
150
+ trustProxy: typedBundle.manifest.trustProxy,
151
+ }),
152
+ );
150
153
  await sendWebResponse(response, webResponse);
151
154
  } catch (error) {
152
155
  options.logError?.('Dev SSR request failed', error);