nstantpage-agent 0.8.16 → 0.8.17
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/tunnel.js +3 -3
- package/package.json +1 -1
package/dist/tunnel.js
CHANGED
|
@@ -362,7 +362,7 @@ export class TunnelClient {
|
|
|
362
362
|
*/
|
|
363
363
|
handleWsOpenDevServer(wsId, url, protocol, targetPort) {
|
|
364
364
|
const port = (targetPort && targetPort > 0) ? targetPort : this.devPort;
|
|
365
|
-
const wsUrl = `ws://
|
|
365
|
+
const wsUrl = `ws://localhost:${port}${url}`;
|
|
366
366
|
console.log(` [Tunnel] Opening HMR WS relay: ${wsId} → ${wsUrl}`);
|
|
367
367
|
const wsOptions = {};
|
|
368
368
|
const protocols = protocol ? protocol.split(',').map(p => p.trim()) : undefined;
|
|
@@ -519,13 +519,13 @@ export class TunnelClient {
|
|
|
519
519
|
forwardToLocal(request, port) {
|
|
520
520
|
const { id, method, url, headers, body } = request;
|
|
521
521
|
const reqOptions = {
|
|
522
|
-
hostname: '
|
|
522
|
+
hostname: 'localhost',
|
|
523
523
|
port,
|
|
524
524
|
path: url,
|
|
525
525
|
method,
|
|
526
526
|
headers: {
|
|
527
527
|
...headers,
|
|
528
|
-
host: `
|
|
528
|
+
host: `localhost:${port}`,
|
|
529
529
|
'x-forwarded-host': headers.host || '',
|
|
530
530
|
'x-tunnel-request-id': id,
|
|
531
531
|
},
|
package/package.json
CHANGED