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 = {