Merge pull request #258 from TxtDot/dev
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run

Fix: #257
This commit is contained in:
Artemy Egorov 2025-02-15 16:59:44 +03:00 committed by GitHub
commit 220182dd42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@txtdot/server",
"version": "1.10.0",
"version": "1.10.1",
"private": true,
"description": "txtdot is an HTTP proxy that parses only text, links and pictures from pages reducing internet bandwidth usage, removing ads and heavy scripts",
"main": "dist/app.js",

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(