fix: port

This commit is contained in:
Artemy Egorov 2025-02-15 16:55:49 +03:00
parent 97fed8e476
commit d640f90318

View File

@ -4,13 +4,9 @@ export function generateRequestUrl(
port: number, port: number,
originalUrl: string originalUrl: string
): URL { ): URL {
let actual_port = return new URL(
protocol === 'https' && port === 443 `${protocol}://${host}${port === null ? '' : `:${port}`}${originalUrl}`
? '' );
: protocol === 'http' && port === 80
? ''
: `:${port}`;
return new URL(`${protocol}://${host}${actual_port}${originalUrl}`);
} }
export function generateParserUrl( export function generateParserUrl(