mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-11 17:24:21 +01:00
Skip HeadersOverrideMiddleware if on onion
This commit is contained in:
@@ -23,7 +23,10 @@ namespace BTCPayServer.Hosting
|
||||
{
|
||||
if (!string.IsNullOrEmpty(overrideXForwardedProto))
|
||||
{
|
||||
httpContext.Request.Headers["X-Forwarded-Proto"] = overrideXForwardedProto;
|
||||
if (!httpContext.Request.Host.Host.EndsWith(".onion", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
httpContext.Request.Headers["X-Forwarded-Proto"] = overrideXForwardedProto;
|
||||
}
|
||||
}
|
||||
await _Next(httpContext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user