Closed h0useRus closed 5 years ago
What's the format? It may be as easy as changing the default header name if the format matches: https://github.com/aspnet/BasicMiddleware/blob/347d1abfce8c257125bea17067f10cf30ce85396/src/Microsoft.AspNetCore.HttpOverrides/ForwardedHeadersOptions.cs#L16
Yes, we can, but then we loosing XForwardedFor header if Akamai header not exists and do extra configuration logic based on hosting environment.
Akamai sample here https://community.akamai.com/thread/4612-can-i-get-client-ip-from-this-header-httpcontextcurrentrequestheaderstrue-client-ip
Also is ForwarderdHeaders support IP v6? I'm not found any tests for it.
How about adding a separate instance of UseForwardedHeaders that specifies the Akamai header name? They can stack.
That thread doesn't show the contents of the header.
Yes, IPv6 is supported. https://github.com/aspnet/BasicMiddleware/blob/347d1abfce8c257125bea17067f10cf30ce85396/test/Microsoft.AspNetCore.HttpOverrides.Tests/IPEndPointParserTest.cs#L16-L18
Good point to know, it really solve the problem, not ideal, but works.
Here is official documentation from Akamai https://community.akamai.com/videos/1232
Got it, Great thanks.
Could you add Akamai True-Client-IP for ForwardedHeaders, or make it more modular for injecting custom headers handlers?