GithubHelp home page GithubHelp logo

emesday / prefixed-superset Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 6.0 9 KB

Adds context path (url prefix, sub path) of Apache Superset by NGINX reverse proxy and sub_filter.

License: MIT License

superset

prefixed-superset's Introduction

prefixed-superset

Adds context path (url prefix, sub path) of Apache Superset by NGINX reverse proxy and sub_filter.

How to use

Start a superset and nginx

with awesome(default) context path

$ docker-compose up -d 

or

with the context path mysuperset

$ SUPERSET_CONTEXT_PATH=mysuperset docker-compose up -d

Load examples

$ docker exec -it prefixed_superset superset load_examples

Accesss

1. Direct access (for testing)

http://localhost:8080

2. With context path

http://localhost/awesome/superset/welcome/ or http://localhost/${SUPERSET_CONTEXT_PATH}/superset/welcome/

Stop the superset and nginx

$ docker-compose down

prefixed-superset's People

Contributors

art1s avatar blzsaa avatar emesday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

prefixed-superset's Issues

localhost/ 404 after success login and logout

I have problems with the <my_prefix>/login/ endpoint.
After I specify the correct login data in form and click LOGIN, a 404 nginx localhost/ error occurs.
Moreover, authorization is successful, and I can visit localhost/<my_prefix>/superset/welcome/.
The same problem occurs with <my_prefix>/logout/.

  • I've already tried adding / to the end of sub_filter '/login/' in superset.conf.template, but it doesn't help.
  • If i add one more location to the superset.conf.template:
location / {
proxy_pass http://superset-nginx/;
}

the error goes away, but after authorization nginx redirects to page without prefix.
Have you any suggestion, how to fix it?

OAuth callback does not work

Hi,

Great effort with this. Very happy to see that you managed to implement /prefix. I was trying to adapt this for my use case but ran into an issue with OAuth login with TLS offloading on nginx.

On a successful login, the IdP redirects the user back to /oauth-authorized which breaks. I spent some time to try to create paths but it did not work. If you can add support for this, it would be amazing!

Getting 404

Not sure what I'm doing wrong. Containers come up fine using docker-compose using SUPERSET_CONTEXT_PATH=mysuperset docker-compose up -d

When typing in http://crm.xxxxx.com/mysuperset my browser just gives me a 404 and shows this in my url http://crm.xxxxx.com/superset/welcome/

Nginx container log
192.168.1.49 - - [19/Jan/2023:20:33:15 +0000] "GET /mysuperset HTTP/1.1" 301 180 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" "-"
192.168.1.49 - - [19/Jan/2023:20:33:15 +0000] "GET /mysuperset/ HTTP/1.1" 302 261 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" "-"
2023/01/19 20:33:15 [error] 9#9: *1 "/etc/nginx/html/superset/welcome/index.html" is not found (2: No such file or directory), client: 192.168.1.49, server: , request: "GET /superset/welcome/ HTTP/1.1", host: "crm.xxxxx.com"
192.168.1.49 - - [19/Jan/2023:20:33:15 +0000] "GET /superset/welcome/ HTTP/1.1" 404 555 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" "-"
192.168.1.49 - - [19/Jan/2023:20:33:29 +0000] "GET /superset/welcome/ HTTP/1.1" 404 555 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" "-"
2023/01/19 20:33:29 [error] 9#9: *1 "/etc/nginx/html/superset/welcome/index.html" is not found (2: No such file or directory), client: 192.168.1.49, server: , request: "GET /superset/welcome/ HTTP/1.1", host: "crm.xxxxx.com"

superset container log
172.25.0.3 - - [19/Jan/2023:20:33:15 +0000] "GET / HTTP/1.0" 302 223 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.