0
suruat created
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
6 Answer(s)
-
0
Does anyone have any idea about this?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
172.16.1.1is a private IP address. You can configure it as a known proxy inapp.UseForwardedHeaders(...)beforeapp.UseAuthentication(). public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) { ... var forwardedHeadersOptions = new ForwardedHeadersOptions // Add this { // Add this ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto // Add this }; // Add this forwardedHeadersOptions.KnownProxies.Add(IPAddress.Parse("::ffff:172.16.1.1")); // Add this app.UseForwardedHeaders(forwardedHeadersOptions); // Add this app.UseAuthentication(); ... } Microsoft docs: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-3.1
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Sorry I wasnt clear. Im more interesting in capturing the actual public client IP address from the incoming reqesting. Currently that oa not happening. Im only getting the known IP. How can I do this?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I just told you exactly how and even provided a code sample that you can copy and paste directly into your ASP .NET Zero solution.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Oh Sorry!
Trying this now.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks @aaron, That seemed to have worked for me.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)
