I've already seen this ticket: https://abp.io/support/questions/7304/Ip-address-in-audit-logs-not-client%27s-ip-address
I've confirmed X-Forwarded-For is correct

I've done the following code changes
In EduverseHttpApiHostModule in OnApplicationInitialization

11 Answer(s)
- 
    0You may need to configure your web server. Can you explain how your project is deployed? 
- 
    0we have deployed the FE stack on Cloudfront + s3. This connects via Application Load balancer to backend stack which is on Elastic Container Service. Note that in the example I gave, I called the endpoint from the Swagger UI. Also the X-Forwarded-For header showing a valid IP address is the exact same request which was logged by Audit Log (which recorded a loopback IP address). I would assume that the IP address would be taken from that X-Forwarded-For header. 
- 
    0This connects via Application Load balancer to backend stack which is on Elastic Container Service. Hi, In addition to configuring the ASPNETCore application, you need to configure the web server(load balancer) See - https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-9.0
- https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html
 
- 
    0
- 
    0Hi, Could you share your EduverseHttpApiHostModulecode? thanks.
- 
    0Sure, will share the code privately via email 
- 
    0My email is shiwei.liang@volosoft.com 
- 
    0Hi, I checked your code, you put the forward headers middleware at the end of the pipeline. that's why it's not working. You can try moving it under UseCookiePolicySee the document https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-9.0#forwarded-headers-middleware-order 
- 
    0great catch, it works now. thank you. on a separate note, I would like to unlock a ticket to add more comments: https://abp.io/support/questions/8778/Language-Text-changes-to-be-platform-wide are you able to help me with that? 
- 
    0okay, unlocked. 
- 
    0greatly appreciated, i think we can close this ticket, many thanks 





 
                                