Closed leoleovich closed 5 years ago
That used to work before migrating to Gin, I could consider bringing it again if there's enough positive votes.
Definitely being able to specify an ENV var or cmd line option to specify the Engine
path would be awesome.
As links are relative it almost works, but then redirects (from non-trail slash to slash - for dashboard/
, and the other way around - for jobs
) proxy_redirect
is required and as there is actually that bug in assets path, it also needs the sub_filter mentioned above.
To be clearer on the bug, static path for /dashboard/jobs
is wrongly generated as ../../static
.
That would be correct for /dashboard/jobs/
but as it is redirected to /dashboard/jobs
it should only be ../static
.
Fixing this small thing would already help :)
@fopina the static path you mention is currently fixed.
WRT the possibility to host this in a subpath I will try something.
IMO there's no actual need to support running on a path with that fixed, it is possible to properly/cleanly use the nginx path with proxypass.
Specifying a path could still be useful in the future if absolute URLs start being used somewhere, but at least now I only see relative ones used, so everything works.
AFAIK this issue could be closed :)
Great, thx!
Hello:) Thank you very much for the awesome software. We have a requirement to run it in nginx location. For example
/dkron
. Unfortunately html, returned by dkron, contains absolute paths starting with/
. So in this case client, who requests/dkron
gets links tocss
andjs
assets like/static/...
which of course do not exist. As a solution for now I have to overwrite output via nginx like this:which is pretty ugly and may not work in the future.
I was thinking to implement something like, Grafana for example, has. See setting
root_url
- https://github.com/grafana/grafana/blob/bc6a57ce329d831c42b5d9acf80964e2e9a57163/docs/sources/installation/configuration.md#root_url This will let us to specify "absolute url" to return. I can implement it myself, but it might take quite some time and I wanted to be sure you are fine with this idea. And of course I would prefer if owner of the software would implement this :) Thanks!