But it would be even nicer if it added support for the Forwarded header defined in RFC 7239 as well, since this is a more versatile and well-defined header than the de-facto ones.
With Forwarded, all information about the forwarding of a request is kept inside one header, instead of three. So this:
While a 31% reduction is nice in and of itself, the Forwarded header also defines the order of elements in each header and groups them together in a way that is both undefined and complex to replicate with the three X-Forwarded-* headers.
The
app.UseForwardedHeaders()
method adds support for the de-facto standardX-Forwarded-*
headers, which is nice:https://github.com/aspnet/BasicMiddleware/blob/8f0cc61808e09d646ba6c32e8785a6cd8f56be29/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersExtensions.cs#L17-L25
But it would be even nicer if it added support for the
Forwarded
header defined in RFC 7239 as well, since this is a more versatile and well-defined header than the de-facto ones.With
Forwarded
, all information about the forwarding of a request is kept inside one header, instead of three. So this:Is condensed to this:
While a 31% reduction is nice in and of itself, the
Forwarded
header also defines the order of elements in each header and groups them together in a way that is both undefined and complex to replicate with the threeX-Forwarded-*
headers.