Open mihaigalos opened 2 weeks ago
Whilst I'll try to set up a local kubernetes cluster I've changed some code according to your requirements:
-r.Mount("/", http.FileServer(http.FS(c.frontend)))
+baseUrl := config.Instance().BaseURL
+r.Mount(baseUrl+"/", http.StripPrefix(baseUrl, http.FileServerFS(c.frontend)))
the BaseURL is configurable through the config.yml
file with the base_url
key:
...
base_url: "/hello"
...
I would like to let this run in a Kubernetes environment. I've already written the chart for it and can contribute when fully operational.
I however am missing an app-side configuration which would allow me to serve content from a specified path. A change would be required here:
This is the standard way of handling prefixing in other major apps (Prometheus, Grafana) and could be consumed though a config.yml parameter.
I know you're refactoring the repo which is why I'm not contributing a PR. Also, I cannot build from source with 7ea1c0b205d258c0833e1fe4ead7dbfce8342c0b, but would love to contribute otherwise: