# Discouse with NginX reverse proxy - Cannot log in

**URL:** <https://meta.discourse.org/t/discouse-with-nginx-reverse-proxy-cannot-log-in/205216>\
**Category:** Self-hosting\
**Created:** [October 5, 2021, 1:26am UTC](https://meta.discourse.org/t/discouse-with-nginx-reverse-proxy-cannot-log-in/205216 "2021-10-05T01:26:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stum](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@stum](https://meta.discourse.org/u/stum)\
**Post date:** [October 5, 2021, 6:40am UTC](https://meta.discourse.org/t/discouse-with-nginx-reverse-proxy-cannot-log-in/205216/3 "2021-10-05T06:40:36Z")

</div>

I’ve added that directive but still getting the same issue. Conf looks like this now:

```plaintext
server {

    listen 80;
    server_tokens off;
    server_name forum.test.financefeast.io;
    location / {
	 return 301 https://$host$request_uri;
    }
    location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
         expires 30m;
         add_header Pragma public;
         add_header Cache-Control "public";
    }
}
		
server {

    ssl_certificate /etc/nginx/certs/test.financefeast.io-bundle.crt;
    ssl_certificate_key /etc/nginx/certs/test.financefeast.io.key;

    listen 443 ssl;
    server_name forum.test.financefeast.io;
    location / {
	add_header 'Access-Control-Allow-Origin' "$http_origin";
	add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
	add_header 'Access-Control-Allow-Credentials' 'true';
	add_header 'Access-Control-Allow-Headers' 'User-Agent,Keep-Alive,Content-Type';
	proxy_set_header Host $http_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 https;
	proxy_read_timeout 90;
	proxy_http_version 1.1;
 	proxy_buffers 8 32k;
	proxy_buffer_size 64k;
	proxy_pass https://kube_lb;
	}
}

```

---

_[View the full topic](https://meta.discourse.org/t/discouse-with-nginx-reverse-proxy-cannot-log-in/205216)._
