diff --git a/BTCPayServer/Hosting/BTCpayMiddleware.cs b/BTCPayServer/Hosting/BTCpayMiddleware.cs index 4aa3f6b1d..28fd44b60 100644 --- a/BTCPayServer/Hosting/BTCpayMiddleware.cs +++ b/BTCPayServer/Hosting/BTCpayMiddleware.cs @@ -83,14 +83,14 @@ namespace BTCPayServer.Hosting var path = httpContext.Request.Path.Value; if ( bitpayAuth && - path == "/invoices" && + (path == "/invoices" || path == "/invoices/") && httpContext.Request.Method == "POST" && isJson) return true; if ( bitpayAuth && - path == "/invoices" && + (path == "/invoices" || path == "/invoices/") && httpContext.Request.Method == "GET") return true; @@ -106,7 +106,7 @@ namespace BTCPayServer.Hosting if ( path.Equals("/tokens", StringComparison.Ordinal) && - ( httpContext.Request.Method == "GET" || httpContext.Request.Method == "POST")) + (httpContext.Request.Method == "GET" || httpContext.Request.Method == "POST")) return true; return false; diff --git a/BTCPayServer/Security/BitpayAuthentication.cs b/BTCPayServer/Security/BitpayAuthentication.cs index 2fac207ad..beb769a66 100644 --- a/BTCPayServer/Security/BitpayAuthentication.cs +++ b/BTCPayServer/Security/BitpayAuthentication.cs @@ -210,14 +210,14 @@ namespace BTCPayServer.Security var path = httpContext.Request.Path.Value; if ( bitpayAuth && - path == "/invoices" && + (path == "/invoices" || path == "/invoices/") && httpContext.Request.Method == "POST" && isJson) return true; if ( bitpayAuth && - path == "/invoices" && + (path == "/invoices" || path == "/invoices/") && httpContext.Request.Method == "GET") return true;