fix(smartproxy): Update dynamic port mapping to support

This commit is contained in:
2025-05-14 18:35:06 +00:00
parent 2d6f06a9b3
commit 340823296a
8 changed files with 495 additions and 10 deletions

View File

@@ -204,7 +204,7 @@ export class WebSocketHandler {
targetPort = route.action.target.port(toBaseContext(routeContext));
this.logger.debug(`Resolved function-based port for WebSocket: ${targetPort}`);
} else {
targetPort = route.action.target.port;
targetPort = route.action.target.port === 'preserve' ? routeContext.port : route.action.target.port as number;
}
// Select a single host if an array was provided