Skip to content
Documentation

IProxySettings Interface

Defines settings for operating an HTTP service behind a reverse proxy.

public interface IProxySettings

When a service is deployed behind a reverse proxy (such as nginx or IIS ARR), the proxy typically sets X-Forwarded-* headers that the service must interpret. This interface captures the path base rewriting and ForwardedHeadersOptions needed to correctly resolve client addresses, protocols and host names.

Gets the default proxy settings with no path base and forwarded headers disabled.

static HAKOM.Http.Core.Net.Api.IProxySettings Defaults { get; }

IProxySettings

IProxySettings.ForwardedHeadersOptions Property

Section titled “IProxySettings.ForwardedHeadersOptions Property”

Gets the ForwardedHeadersOptions that control how X-Forwarded-* headers are processed.

Microsoft.AspNetCore.Builder.ForwardedHeadersOptions ForwardedHeadersOptions { get; }

Microsoft.AspNetCore.Builder.ForwardedHeadersOptions

The configuration key under which proxy settings are expected.

static string Key { get; }

System.String

Gets an optional path base that the reverse proxy strips before forwarding the request.

string? PathBase { get; }

System.String

When set, the service will prepend this value to Microsoft.AspNetCore.Http.HttpRequest.PathBase so that URLs generated by the application match the externally visible paths.

IProxySettings.TryRead(IConfiguration) Method

Section titled “IProxySettings.TryRead(IConfiguration) Method”

Attempts to read proxy settings from the specified configuration.

static HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.Http.Core.Net.Api.IProxySettings> TryRead(Microsoft.Extensions.Configuration.IConfiguration configuration);

configuration Microsoft.Extensions.Configuration.IConfiguration

The Microsoft.Extensions.Configuration.IConfiguration to read from.

HAKOM.ErrorHandling.Core.Net.Api.Result<IProxySettings>
A Result<TValue> containing the parsed IProxySettings.

© 2026 Volue.Version v0.6.38017 November 2026