From 3758c1f0c44b1d828ee966718fd8bf4c9b6692dd Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 31 Jul 2023 13:22:46 +0100 Subject: [PATCH] Remove public host --- NostrStreamer/Config.cs | 1 - NostrStreamer/Services/Dvr/S3DvrStore.cs | 4 +--- NostrStreamer/appsettings.json | 3 +-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/NostrStreamer/Config.cs b/NostrStreamer/Config.cs index fdf7152..95f4634 100644 --- a/NostrStreamer/Config.cs +++ b/NostrStreamer/Config.cs @@ -58,5 +58,4 @@ public sealed class S3BlobConfig public string? Region { get; init; } public string BucketName { get; init; } = "zap-stream-dvr"; public bool DisablePayloadSigning { get; init; } - public Uri PublicHost { get; init; } = null!; } diff --git a/NostrStreamer/Services/Dvr/S3DvrStore.cs b/NostrStreamer/Services/Dvr/S3DvrStore.cs index e7d497e..ea9c88f 100644 --- a/NostrStreamer/Services/Dvr/S3DvrStore.cs +++ b/NostrStreamer/Services/Dvr/S3DvrStore.cs @@ -75,11 +75,9 @@ public class S3DvrStore : IDvrStore var tsUpload = sw.Elapsed; - var ret = new Uri(_config.PublicHost, new Uri(url).AbsolutePath); - _logger.LogInformation("download={tc:#,##0}ms, probe={pc:#,##0}ms, upload={uc:#,##0}ms", tsDownload.TotalMilliseconds, tsProbe.TotalMilliseconds, tsUpload.TotalMilliseconds); - return new(ret, probe.Duration.TotalSeconds); + return new(new Uri(url), probe.Duration.TotalSeconds); } } diff --git a/NostrStreamer/appsettings.json b/NostrStreamer/appsettings.json index 3533666..3dce34f 100644 --- a/NostrStreamer/appsettings.json +++ b/NostrStreamer/appsettings.json @@ -28,8 +28,7 @@ "DvrStore": { "ServiceUrl": "http://localhost:9010", "AccessKey": "TQcxug1ZAXfnZ5bvc9n5", - "SecretKey": "p7EK4qew6DBkBPqrpRPuJgTOc6ChUlfIcEdAwE7K", - "PublicHost": "http://localhost:9010" + "SecretKey": "p7EK4qew6DBkBPqrpRPuJgTOc6ChUlfIcEdAwE7K" } } }