Skip to content

Commit c5ccd2e

Browse files
authored
add pathname for remoteClient
1 parent ec63b1a commit c5ccd2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ws-proxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = (config) => {
2828
try {
2929
await onOpen(client, url.searchParams)
3030

31-
const target = route.target + '?' + url.searchParams.toString()
31+
const target = route.target + url.pathname + '?' + url.searchParams.toString()
3232
const remote = new WebSocket.Client(target, subProtocols, route.proxyConfig)
3333

3434
client.pipe(remote)

0 commit comments

Comments
 (0)