Base solution for your next web application
Open Closed

Audit-log and Login attempt IP Address Issue #7080


User avatar
0
velu created

HI,

We are using .netcore and angular.

In Audit-log and Login attempt displays Networkload balancer Ip insted of clients machine Ip.

Please suggest us a way to get client machines IP.

In this condition we get client machines ip using request header.

But, How can we assign this ip address to perticular appservice like audit-log and Login attempt for inserting in database.

Thanks


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    You can override the GetClientIpAddress method.

    https://github.com/aspnetboilerplate/aspnetboilerplate/blob/e0ded5d8702f389aa1f5947d3446f16aec845287/src/Abp.AspNetCore/AspNetCore/Mvc/Auditing/HttpContextClientInfoProvider.cs#L39

    https://github.com/aspnetboilerplate/aspnetboilerplate/issues/467#issuecomment-217428190