HA behind nginx - refresh logs me out

Hello,

I just setup nginx for my HA instance. Everything seems to work fine, except that every refresh on the site logs me out. I tried different settings in the nginx.conf but the issue remains.

Here is the section from nginx:

server {
        listen                  443 ssl;
        listen                  [::]:443 ssl;
        http2                   on;
        include                 /etc/nginx/ssl.conf;
        server_name             homeassistant.youdontknow.me;

        location / {
                proxy_pass              http://192.168.10.8:8123/;
                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_http_version      1.1;
                proxy_set_header        Upgrade $http_upgrade;
                proxy_set_header        Connection "upgrade";
        }
}

I also added the IP of my nginx server unter the network settings in HA.

Is there a way to track down the issue? It seems there is nothing in the logs about this.

Thank you!

What do you want to do with this?
Do you want remote access our you want to resolve this domain to your local host and use it locally ?

I want to remote access HA.