ASP.Net Core with nginx set host header not working
<p>I'm trying to host my ASP.Net core app using Nginx.</p>

<p>My <strong>nginx.conf</strong> like this</p>

<pre><code>server {
    listen 80;
    server_name mydomain.com;

    location / {
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;

        proxy_pass http://localhost:5000;                
    }
}
</code></pre>

<p>I added this code to <strong>Configure</strong> method to use forwarded headers</p>

<pre><code>app.UseForwardedHeaders(new ForwardedHeadersOptions {
    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto,
    ForwardLimit = null,
    RequireHeaderSymmetry = false
});
</code></pre>

<p>I navigate to <strong>mydomain.com</strong> from browser and it works until I click the Loggin with google button. It redirect to http://<strong>localhost:5000</strong>/signin-google instead of http://<strong>mydomain.com</strong>/signin-google.</p>

<p>How do I get it redirect to http://<strong>mydomain.com</strong>/signin-google ?</p>