From 8efd51c3278018908d2bbbe60662a62baa976606 Mon Sep 17 00:00:00 2001 From: Alex Kern Date: Sat, 28 Dec 2024 22:13:50 -0800 Subject: [PATCH] Update mitm url --- docker-compose.production.yml | 1 - src/utils/download.ts | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/docker-compose.production.yml b/docker-compose.production.yml index ac64be6..82d014b 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -15,7 +15,6 @@ services: environment: - PORT=80 - REDIS_URL=redis://redis:6379 - - NEXT_PUBLIC_BASE_URL=https://file.pizza networks: - filepizza depends_on: diff --git a/src/utils/download.ts b/src/utils/download.ts index 00c6584..15087a0 100644 --- a/src/utils/download.ts +++ b/src/utils/download.ts @@ -3,13 +3,11 @@ import { createZipStream } from '../zip-stream' // eslint-disable-next-line @typescript-eslint/no-require-imports if (typeof window !== 'undefined') require('web-streams-polyfill/ponyfill') -const baseURL = process.env.NEXT_PUBLIC_BASE_URL ?? 'http://localhost:3000' - const streamSaver = // eslint-disable-next-line @typescript-eslint/no-require-imports typeof window !== 'undefined' ? require('streamsaver') : null if (typeof window !== 'undefined') { - streamSaver.mitm = baseURL + '/stream.html' + streamSaver.mitm = `${window.location.protocol}//${window.location.host}/stream.html` } type DownloadFileStream = {