apache / apache/superset

【6.0.0-RC2】Nginx proxy and subpath problem when "add new dashboard"

Open
#35,712 8 comments 1 reaction 0 assignees View on GitHub
dashboard validation:required
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 4h
Merged PRs (30d)
664

Description

### Bug description

I am running superset in a docker compose stack (docker-compose-image-tag.yml with the apache/superset:6.0.0rc2 image).

I added a nginx proxy to add SSL to the docker-compose yaml.

I have tried many features so far and they work perfectly (new datasources, new datasets, new charts and editing, ...), except adding a new dashboard.

As user admin, when I try to add a dashboard (dashboard/new) from the ui, the redirection does not contain port number or protocol (https):

So, I am at: **https**://mydomain.com:**3000**/app/superset/dashboard/list/?pageIndex=0&sortColumn=changed_on_delta_humanized&sortOrder=desc&viewMode=table

And I click on +Dashboard button or in on + dropdown and then Dashboard link, it goes to:
**http**://mydomain.com/app/superset/dashboard/new,

with no port.

I can write the url directly: https://mydomain.com:3000/app/superset/dashboard/new and I can create the dashboard from there, add charts and save it.

.env

SUPERSET_ROOT_APP=/app/superset

**nginx config:**

http {
upstream superset_upstream {
server superset:8088;
}

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 3000 ssl;
server_name _;

ssl_certificate /etc/nginx/certs/A.pem;
ssl_certificate_key /etc/nginx/certs/Akey;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;

location /apps/superset {
proxy_pass http://superset_upstream;
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_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $host;
}

client_max_body_size 50M;

}
}

### Screenshots/recordings

_No response_

### Superset version

6.0.0rc2

### Python version

3.9

### Node version

16

### Browser

Chrome

### Additional context

_No response_

### Checklist

- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Contributor guide

Open the contributing guide

Research direction

Reproduce the dashboard/new flow with docker-compose-image-tag.yml, the apache/superset:6.0.0rc2 image, SUPERSET_ROOT_APP=/app/superset, and the provided nginx configuration. Start at the dashboard/new UI redirect and compare it with the working dashboard list URL; done means the redirect preserves HTTPS, the port, and the configured subpath.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, nginx, python
Domain
backend, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.