From f65d1675321915449ce089e051eaa18ae5c65e97 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Thu, 11 Apr 2024 21:38:24 +0100 Subject: [PATCH] fix: use correct hostname for the streamer --- src/core/AnonymizedFile.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/AnonymizedFile.ts b/src/core/AnonymizedFile.ts index a0e3eb9..ca58135 100644 --- a/src/core/AnonymizedFile.ts +++ b/src/core/AnonymizedFile.ts @@ -230,7 +230,8 @@ export default class AnonymizedFile { } const cacheableLookup = new CacheableLookup(); - const ipHost = await cacheableLookup.lookupAsync("streamer"); + const hostName = new URL(config.STREAMER_ENTRYPOINT).hostname; + const ipHost = await cacheableLookup.lookupAsync(hostName); // use the streamer service return got.stream(join(config.STREAMER_ENTRYPOINT, "api"), { @@ -283,7 +284,8 @@ export default class AnonymizedFile { this.repository.getToken(), ]); const cacheableLookup = new CacheableLookup(); - const ipHost = await cacheableLookup.lookupAsync("streamer"); + const hostName = new URL(config.STREAMER_ENTRYPOINT).hostname; + const ipHost = await cacheableLookup.lookupAsync(hostName); got .stream(join(config.STREAMER_ENTRYPOINT, "api"), { method: "POST",