Issue with Confluence maintaining domain cookies set through different subdomain

James George
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2018

Hey everyone!

I have a question regarding the use of Confluence and cookies.

Currently I'm setting a domain cookie on a domain like sub.example.com. After that cookie being set, I can access it on example.com, sub2.example.com, and so on.

However, when I try to access the cookie at my Confluence domain, docs.example.com, I'm unable to see the cookie.

Possible issues:

I'm using a reverse proxy to route traffic to confluence IP address via nginx like so:

server {
listen docs.example.com:80;
server_name docs.example.com;

location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cookie_domain docs.example.com $host;
sub_filter "docs.example.com" $host;
proxy_pass http://localhost:8090;
}

location /synchrony {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8091/synchrony;
proxy_http_version 1.1;
proxy_cookie_domain docs.example.com $host;
sub_filter "docs.example.com" $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}

 Other than this I'm unsure why this isn't working. It's like Confluence is clearing out the cookies. Do I need to set a header elsewhere?

Other information, I'm using Confluence Server v6.X with Scroll Viewport.

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
James George
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2018

After digging around some more I found the answer. The issue was that the cookie in question was being set to secure, and Confluence hasn't being served on an HTTPS server. Setting the cookie flag to not be secure or making the server be secure fixed the issue!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events