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
2 changed files with 4 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@txtdot/server", "name": "@txtdot/server",
"version": "1.10.0", "version": "1.10.1",
"private": true, "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", "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", "main": "dist/app.js",

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(