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:
commit
220182dd42
@ -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",
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user