[GH-ISSUE #1413] Behind LB nginx and specific rootURI and https redirects incorrectly #312

Closed
opened 2026-03-07 20:47:36 +03:00 by kerem · 3 comments
Owner

Originally created by @cesarjorgemartinez on GitHub (Jan 12, 2023).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/1413

Originally assigned to: @alexander-skoblikov on GitHub.

Describe the bug
Behind LB nginx and specific rootURI redirects incorrectly.
Example without rootURI: https://fqdn (works)
Example with rootURI: https://fqdn/cloudbeaver (not works)

To Reproduce
Example without rootURI (/): https://fqdn (works)
In browser enter:
https://fqdn
Show url: https://fqdn/#/
Reload
Show url: https://fqdn/#/

Example with rootURI (/cloudbeaver): https://fqdn/cloudbeaver
In browser enter:
https://fqdn/cloudbeaver
Show url: https://fqdn/cloudbeaver#/
Reload
Show url: http://fqdn/#/
And fails can't connect

Screenshots
Not needed

Desktop (please complete the following information):

  • OS: CentOS
  • Browser Firefox
  • Version latest (at 2023 january 12)

Additional context
Nginx and cloudbeaver all docker containers

Originally created by @cesarjorgemartinez on GitHub (Jan 12, 2023). Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/1413 Originally assigned to: @alexander-skoblikov on GitHub. **Describe the bug** Behind LB nginx and specific rootURI redirects incorrectly. Example without rootURI: https://fqdn (works) Example with rootURI: https://fqdn/cloudbeaver (not works) **To Reproduce** Example without rootURI (/): https://fqdn (works) In browser enter: https://fqdn Show url: https://fqdn/#/ Reload Show url: https://fqdn/#/ Example with rootURI (/cloudbeaver): https://fqdn/cloudbeaver In browser enter: https://fqdn/cloudbeaver Show url: https://fqdn/cloudbeaver#/ Reload Show url: http://fqdn/#/ And fails can't connect **Screenshots** Not needed **Desktop (please complete the following information):** - OS: CentOS - Browser Firefox - Version latest (at 2023 january 12) **Additional context** Nginx and cloudbeaver all docker containers
kerem closed this issue 2026-03-07 20:47:36 +03:00
Author
Owner

@cesarjorgemartinez commented on GitHub (Jan 12, 2023):

I find a weird workaround but is not a solution for this bug, defining in docker nginx:

server {
  listen 443 ssl;
  listen [::]:443 ssl;
  server_name localhost;
  ssl_certificate /root/ssl/cert.pem;
  ssl_certificate_key /root/ssl/key.pem;
  location /cloudbeaver {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_pass http://cloudbeaver:8978;

proxy_redirect ~^http://(.*)$ https://$1;

  }
  error_page 500 502 503 504 /50x.html;
}

Note only for all dockers, the proxy_pass http://cloudbeaver:8978 is the url of docker cloudbeaver, defined as service container name in compose file.

<!-- gh-comment-id:1380756693 --> @cesarjorgemartinez commented on GitHub (Jan 12, 2023): I find a weird workaround but is not a solution for this bug, defining in docker nginx: ``` server { listen 443 ssl; listen [::]:443 ssl; server_name localhost; ssl_certificate /root/ssl/cert.pem; ssl_certificate_key /root/ssl/key.pem; location /cloudbeaver { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://cloudbeaver:8978; ``` **proxy_redirect ~^http://(.*)$ https://$1;** ``` } error_page 500 502 503 504 /50x.html; } ``` Note only for all dockers, the proxy_pass http://cloudbeaver:8978 is the url of docker cloudbeaver, defined as service container name in compose file.
Author
Owner

@alexander-skoblikov commented on GitHub (Feb 3, 2023):

@cesarjorgemartinez Hi, please try to define not the full url in rootURI parameter, but just /cloudbeaver/.
it's work for me with this nginx config

 location /cloudbeaver {
        proxy_pass http://cloudbeaver:8978;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
<!-- gh-comment-id:1415840019 --> @alexander-skoblikov commented on GitHub (Feb 3, 2023): @cesarjorgemartinez Hi, please try to define not the full url in `rootURI` parameter, but just `/cloudbeaver/`. it's work for me with this nginx config ``` location /cloudbeaver { proxy_pass http://cloudbeaver:8978; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } ```
Author
Owner

@TatyanaSsau commented on GitHub (Apr 3, 2023):

I've noticed there is no updates for a long time.
@cesarjorgemartinez Please, feel free to contact me to reopen the ticket if it's still actual.

<!-- gh-comment-id:1494852902 --> @TatyanaSsau commented on GitHub (Apr 3, 2023): I've noticed there is no updates for a long time. @cesarjorgemartinez Please, feel free to contact me to reopen the ticket if it's still actual.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#312
No description provided.