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
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:
@@ -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",
|
||||||
|
@@ -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(
|
||||||
|
Reference in New Issue
Block a user