From 2fd7ec55c8bc607294ab4044af85891fb36802e4 Mon Sep 17 00:00:00 2001 From: Artemy Egorov Date: Thu, 7 Mar 2024 15:43:29 +0300 Subject: [PATCH] v1.7.0 (#105) * ci: add build check to pull requests * Build(deps-dev): Bump @types/node from 20.10.6 to 20.11.24 (#91) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.10.6 to 20.11.24. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: image compression (#101) * feat: image compression * fix: not compress svg Maybe we should add a function to disable this fix. Since I noticed that if you compress svg in webp it becomes magically smaller. * Configuration page (#104) * feat: image compression * feat: configuration page * refactor: json stringify and change engine buttons to ordered list * fix: engine distributor matching * fix: formatting * build: update txtdot version to 1.7.0 * fix: configuration page title * doc: features (#102) * fix: delete islocal from proxy --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/routes/browser/proxy.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/routes/browser/proxy.ts b/src/routes/browser/proxy.ts index 100a89c..9ec78c1 100644 --- a/src/routes/browser/proxy.ts +++ b/src/routes/browser/proxy.ts @@ -5,18 +5,11 @@ import sharp from 'sharp'; import getConfig from '../../config/main'; import { UnsupportedMimetypeError } from '../../errors/main'; -import isLocalResource from '../../utils/islocal'; -import { LocalResourceError } from '../../errors/main'; - export default async function proxyRoute(fastify: FastifyInstance) { fastify.get( '/proxy', { schema: ProxySchema }, async (request, reply) => { - if (await isLocalResource(new URL(request.query.url))) { - throw new LocalResourceError(); - } - const response = await axios.get(request.query.url); const mime: string | undefined = response.headers['content-type']?.toString();