# Issues .NET Core, Auth0 and NGINX

**URL:** <https://community.auth0.com/t/issues-net-core-auth0-and-nginx/127604>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [February 16, 2024, 10:56pm UTC](https://community.auth0.com/t/issues-net-core-auth0-and-nginx/127604 "2024-02-16T22:56:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FAMEexe](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@FAMEexe](https://community.auth0.com/u/FAMEexe)\
**Post date:** [February 16, 2024, 10:56pm UTC](https://community.auth0.com/t/issues-net-core-auth0-and-nginx/127604/1 "2024-02-16T22:56:08Z")

</div>

Hi,  
i have problems configuring my [ASP.NET](http://ASP.NET) Blazor app using auth0 with a NGINX reverse-proxy.  
I tested the Blazor app on my local machine and everything went well. After deploying it to a docker environment with a nginx reverse-proxy i get the following issues:  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/d/6de668522ceebb554df91c1ea478ea0b3813d07f.png)  
I get this prompt that I am connecting to an insecure connection. And after confirming that i ran into the next issue (i assume this issue is following out of the insecure-connection-issue).

 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/1/61cba8f2dc721d7894f3d75b8518eeffebb347ed.png)

Can someone help me with that?  
Kind regards  
Felix

---

<div class="post-metadata">

**Author:** ![FAMEexe](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@FAMEexe](https://community.auth0.com/u/FAMEexe)\
**Post date:** [February 16, 2024, 11:42pm UTC](https://community.auth0.com/t/issues-net-core-auth0-and-nginx/127604/2 "2024-02-16T23:42:47Z")

</div>

My fix was the following:

```auto
var forwardingOptions = new ForwardedHeadersOptions()
{
    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
};
forwardingOptions.KnownNetworks.Clear(); // Loopback by default, this should be temporary
forwardingOptions.KnownProxies.Clear(); // Update to include

app.UseForwardedHeaders(forwardingOptions);

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 1, 2024, 11:43pm UTC](https://community.auth0.com/t/issues-net-core-auth0-and-nginx/127604/3 "2024-03-01T23:43:42Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
