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

@ -540,7 +540,7 @@ export class RequestHandler {
this.logger.debug(`Resolved function-based port to: ${resolvedPort}`);
}
} else {
targetPort = matchingRoute.action.target.port;
targetPort = matchingRoute.action.target.port === 'preserve' ? routeContext.port : matchingRoute.action.target.port as number;
}
// Select a single host if an array was provided
@ -760,7 +760,7 @@ export class RequestHandler {
this.logger.debug(`Resolved HTTP/2 function-based port to: ${resolvedPort}`);
}
} else {
targetPort = matchingRoute.action.target.port;
targetPort = matchingRoute.action.target.port === 'preserve' ? routeContext.port : matchingRoute.action.target.port as number;
}
// Select a single host if an array was provided