POS improvements (#4668)

This commit is contained in:
d11n
2023-02-23 09:52:37 +01:00
committed by GitHub
parent ddb125f458
commit 66e1eee010
11 changed files with 92 additions and 56 deletions

View File

@@ -35,9 +35,9 @@ namespace BTCPayServer.Filters
var matchedDomainMapping = mapping.FirstOrDefault(item => item.AppId == appId);
// App is accessed via path, redirect to canonical domain
if (matchedDomainMapping != null)
var req = context.RouteContext.HttpContext.Request;
if (matchedDomainMapping != null && req.Method != "POST" && !req.HasFormContentType)
{
var req = context.RouteContext.HttpContext.Request;
var uri = new UriBuilder(req.Scheme, matchedDomainMapping.Domain);
if (req.Host.Port.HasValue) uri.Port = req.Host.Port.Value;
context.RouteContext.HttpContext.Response.Redirect(uri.ToString());