diff --git a/BTCPayServer/Extensions/UrlHelperExtensions.cs b/BTCPayServer/Extensions/UrlHelperExtensions.cs index 70426808e..4ebd335ae 100644 --- a/BTCPayServer/Extensions/UrlHelperExtensions.cs +++ b/BTCPayServer/Extensions/UrlHelperExtensions.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Mvc return url; if (httpRequest is null) return null; - if (Uri.TryCreate(url, UriKind.Absolute, out var r) && r.Host.Equals(httpRequest.Host.Host)) + if (Uri.TryCreate(url, UriKind.Absolute, out var r) && r.Host.Equals(httpRequest.Host.Host) && (!httpRequest.IsHttps || r.Scheme == "https")) return url; return null; } diff --git a/BTCPayServer/Views/Shared/ConfirmModal.cshtml b/BTCPayServer/Views/Shared/ConfirmModal.cshtml index 5658f64bf..35a2f33bc 100644 --- a/BTCPayServer/Views/Shared/ConfirmModal.cshtml +++ b/BTCPayServer/Views/Shared/ConfirmModal.cshtml @@ -32,7 +32,7 @@ @if (!string.IsNullOrEmpty(Model.Action)) { -