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,
originalUrl: string
): URL {
let actual_port =
protocol === 'https' && port === 443
? ''
: protocol === 'http' && port === 80
? ''
: `:${port}`;
return new URL(`${protocol}://${host}${actual_port}${originalUrl}`);
return new URL(
`${protocol}://${host}${port === null ? '' : `:${port}`}${originalUrl}`
);
}
export function generateParserUrl(