goldilocks icon indicating copy to clipboard operation
goldilocks copied to clipboard

basePath is not being honored for static assets, e.g. CSS and Images

Open stormmore opened this issue 2 years ago • 7 comments

What happened?

setting the base path doesn't change the href for images and css

What did you expect to happen?

images and css to be downloaded and rendered

How can we reproduce this?

setg basePath

Version

4.10.0

Search

  • [X] I did search for other open and closed issues before opening this.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Additional context

No response

stormmore avatar Sep 25 '23 18:09 stormmore

Stevie was able to reproduce this. We'll take a look

sudermanjr avatar Sep 26 '23 16:09 sudermanjr

Hello, just curious to know when this bug will be fixed?

karimarous avatar Dec 01 '23 08:12 karimarous

I'm having the same problem. Doesn't work 404- https:///goldilocks I get this page but all images and css is broken - https:///goldilocks/namespaces

The images do exist under /goldilocks/static/images/goldilocks.svg However the dashboard page is only linking to /static/images/goldilocks.svg

ericksoncl23 avatar Feb 13 '24 20:02 ericksoncl23

Still facing the same issue. I'm using the latest helm version 8.0.1

karimarous avatar Feb 14 '24 09:02 karimarous

Is there any previous version that works waiting for the fix ?

This is due to the trailing slash that is missing in base href but can't find where it's done.

edit: it works with image 4.9.0 with latest helm chart

BzSpi avatar Feb 29 '24 16:02 BzSpi

As a workaround one can use custom Ingress with a similar configuration:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /goldilocks/static/$1/$2
    nginx.ingress.kubernetes.io/use-regex: 'true'
  name: fairwinds-goldilocks-static
spec:
  rules:
    - host: your.host
      http:
        paths:
          - backend:
              service:
                name: fairwinds-goldilocks-dashboard
                port:
                  name: http
            path: /static/(css|images|js|webfonts)/(.*)$
            pathType: ImplementationSpecific
...

julian-vp avatar Mar 04 '24 17:03 julian-vp

Confirmed this works in 4.9.0 image with latest helm chart. Are there any plans to fix this?

dlahn avatar Mar 18 '24 18:03 dlahn

Please reopen.

BzSpi avatar May 27 '24 06:05 BzSpi