fix: port
This commit is contained in:
parent
97fed8e476
commit
d640f90318
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user