equinor / webviz-config

Make Dash applications from a user-friendly config file :book: :snake:
https://github.com/orgs/equinor/projects/24
MIT License
55 stars 39 forks source link

Running webviz application behind Nginx ingress controller with url prefix #523

Open sveinung-r opened 3 years ago

sveinung-r commented 3 years ago

I was attempting to set up an endpoint with a webviz application running in Kubernetes behind a Nginx ingress controller. I wanted the application to be located behind a url prefix like this: https://my_url/my_prefix. The ingress controller will then strip away the prefix before forwarding the request to the webviz application container.

This led to several issues:

  1. Redirects (such as to /login) did not include the prefix
  2. The redirect url passed to the oauth2 endpoint did not include the prefix, and was http
  3. On the client side, the application would attempt fetching resources (_dash-component-suites etc.) without using the prefix

Is there a solution to this already? Would it be possible to add support for this kind of use case by for instance reacting to the X-Forwarded family of http headers?

mhwaage commented 2 years ago

I have a similar issue that I described in #535, in that case adding a proxyfix to the flask app in one plugin solved my issue (http vs https redirect). Could that same workaround work for you @sveinung-r ?