mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-15 12:20:16 +01:00
Skip HeadersOverrideMiddleware if on onion
This commit is contained in:
parent
ca17efbc29
commit
40b191ef49
1 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,10 @@ namespace BTCPayServer.Hosting
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(overrideXForwardedProto))
|
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);
|
await _Next(httpContext);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue