Prerequisites
- What is your product version? -> 8.1
- What is your product type (Angular or MVC)? -> Angular
- What is product framework type (.net framework or .net core)? -> .net core
Hello guys,
I have one more issue with the cloud setup that contains of a firewall port forwarding to NGINX (reverse proxy, SSL offloading) and dockered host/ng. The audit log is now showing the docker network's gateway IP only instead of the actual client's IP. A similar thread regarding Abp can be found here: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/5359
Can you please advice how we should solve this for Zero 8.1 ASP.NET CORE & Angular .NET Core 3.0 package?
Thanks!
3 Answer(s)
-
0
hi
You can forward the real IP in nginx and then rewrite the GetClientIpAddress method of HttpContextClientInfoProvider to get the info in the request header.
https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.AspNetCore/AspNetCore/Mvc/Auditing/HttpContextClientInfoProvider.cs#L37