NGINX Reverse Proxy & Cuba Apps

Hello Cuba Team,

We have deployed several apps all running behind a NGINX reverse proxy. All the apps currently deploy to the ROOT folder of AWS beanstalks. All is well.

We have noticed that we cannot be logged into more than one (different) Cuba app at the same time in the same browser or we will get the session disconnected banner message.

I tried following using the proxy_cookie_path from the forum post, and still ran into the same result.

Here is an example block from the proxy -

    location /someappname/ {  
    #proxy_cookie_path /app/ /;
    #proxy_set_header Cookie $http_cookie;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
    proxy_pass http://some-url.elasticbeanstalk.com/;
    }

I am missing something here, just not sure what.

I appreciate your time!

Hi,
I may be wrong, but as far as know, such browsers as Chrome, always share cookies between sites on the same domain name. Even if you deploy them nearby on the localhost. So yes, you can’t be logged into more than one (different) Cuba app at the same time in the same browser.

The solution is to create several domain names, separate for each site. They can be sub-domains to reduce domain owning cost.

1 Like

One can also change JSESSIONID cookie name in Tomcat configuration to be able to use several different apps on the same domain.

1 Like

@jreznot You just made everyone on our teams life better.
Thank you
image

1 Like