You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/11/11 21:54:02 UTC

[GitHub] [pulsar] trotman23 opened a new issue #5623: Dashboard assets referenced from absolute path fail to load when running behind a proxy

trotman23 opened a new issue #5623: Dashboard assets referenced from absolute path fail to load when running behind a proxy
URL: https://github.com/apache/pulsar/issues/5623
 
 
   **Describe the bug**
   After deploying the dashboard to kubernetes, and configuring the ingress from the chart correctly, the dashboard is referencing assets from an absolute server path instead of the path behind the proxy. 
   
   I am running an nginx ingress controller in front of the dashboard, proxying to the dashboard based on the path `/pulsar`.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Configure the dashboard ingress values like: 
   ```
     ingress:
       enabled: true
       annotations:
         kubernetes.io/ingress.class: nginx
         nginx.ingress.kubernetes.io/rewrite-target: "/$2"
       tls: {}
       hostname: "example.com" 
       path: "/pulsar(/|$)(.*)"
       port: 80
   ```
   2. Install the chart via helm, and an ingress controller separately.
   3. Visit the root of dashboard application via the ingress controller (`http://example.com/pulsar/`)
   4. View assets attempting to load from absolute path, instead of prefixed with `/pulsar`
   
   **Expected behavior**
   Assets will load properly through the ingress controller
   
   **Screenshots**
   <img width="1874" alt="Screen Shot 2019-11-11 at 3 50 14 PM" src="https://user-images.githubusercontent.com/2636805/68623842-05162200-049b-11ea-8626-12cc212cba0e.png">
   
   
   **Desktop (please complete the following information):**
    - OS: macOS (irrelevant)
   
   **Additional context**
   This cluster is running in AKS, and the ingress is being deployed via the [nginx-ingress chart](https://github.com/helm/charts/tree/master/stable/nginx-ingress)
   
   I'm not very familiar with django and python, but after some searching I think this could be configured via a `uwsgi` parameter, but the chart has no such configurations. I also could forward all traffic for the dashboard-related assets (e.g. `/static/`, `/admin`) directly to the pulsar dashboard, but would strongly prefer to be able to run the complete server on the `/pulsar` path.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services