Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard favourite status, CORs requests and nginx configuration #13327

Closed
github-wcha opened this issue Feb 25, 2021 · 1 comment
Closed

Dashboard favourite status, CORs requests and nginx configuration #13327

github-wcha opened this issue Feb 25, 2021 · 1 comment
Labels

Comments

@github-wcha
Copy link

@github-wcha github-wcha commented Feb 25, 2021

When loading the superset welcome screen, two error messages pop up with the message:
There was an error fetching the favorite status: NetworkError when attempting to fetch resource.
There are also a stack of errors in the console, which I suspect is related to CORS support and my NGINX configuration.

Expected results

Welcome screen loads without errors and dashboard favourite status loads.

Actual results

When loading the superset welcome screen, two error messages pop up with the message:
There was an error fetching the favorite status: NetworkError when attempting to fetch resource.

In the browser console, I get a whole pile of security errors:
Security Error: Content at https://superset.wcha.asn.au/superset/welcome may not load data from http://superset.wcha.asn.au/api/v1/chart/favorite_status/?q=%21%28585%2C584%2C583%29.

And CORS errors:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:9000/sockjs-node/info?t=1614223846539. (Reason: CORS request did not succeed).

Screenshots

image

How to reproduce the bug

  1. Go to /superset/welcome
  2. See errors

Environment

(please complete the following information):

  • superset version: 1.0.1
  • python version: 3.8.5

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • [x ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • [x ] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

I suspect this is a similar configuration problem as in 13072. I'm not in a Kubernetes environment so I opened a new issue.

NGINX configuration

As I understand it, this really is likely to be a problem with how I've got NGINX set up. We are running it as a reverse proxy on separate VM, and superset in a docker container on another VM altogether.

The relevant blocks from my configuration:


server {
    if ($host = mydomain.com) {
        return 301 https://$host$request_uri;

        listen 80 default_server;
        listen [::]:80 default_server;
        server_name mydomain.com www.mydomain.com;
        return 302 https://$server_name$request_uri;

}

###### SUPSERSET HTTPS ######
# Proxies to port 8088 on the utilities VM

server {
        listen 443 ssl http2 default_server;
        listen [::]:443 ssl http2 default_server;
        include snippets/self-signed.conf;
        include snippets/ssl-params.conf;

        server_name mydomain.com www.mydomain.com;

        location / {
                proxy_pass http://myIP:8088;
                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;

        }
}

Stuff I've tried

None of these have made a schmick of difference. I'm getting the same stream of errors in the console when loading the page.

Grateful for any advice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant