sighupio / gatekeeper-policy-manager

A simple to use web-based OPA Gatekeeper policy manager
https://sighup.io
BSD 3-Clause "New" or "Revised" License
304 stars 33 forks source link

Run GPM behind a reverse proxy using a subpath #452

Open monsdar opened 2 years ago

monsdar commented 2 years ago

I'd like to run GPM behind my traefik reverse proxy using a subpath like https://mydomain.com/gpm. Unfortunately this does not seem to be supported right now, as the main page tries to load resources from the root-path of the domain.

I'm not very familiar with web development, but I think this can be fixed by simply using

Relative path: <script defer="defer" src="./static/js/main.9d2388a4.js"></script> (note the dot in src)

instead of

Absolute path: <script defer="defer" src="/static/js/main.9d2388a4.js"></script> (current code)

when referencing resources.

ralgozino commented 2 years ago

Hi @monsdar

Just to confirm that yes, GPM doesn't work correctly under a subpath. There are a few places that need to be tweaked for this to work. We'll keep it in the radar for the next releases.