hertzbeat
hertzbeat copied to clipboard
[Task] <support config the custom system context path>
Description
from https://gitee.com/dromara/hertzbeat/issues/I8EG8X
eg: contextpath is hertzbeat , access url is http://localhost:1157/hertzbeat/
Task List
- [ ] support config the custom system context path
/assigned to me. ?/
/assigned to me. ?/
ok welcome๐๐
hi @tomsun28 , according to the requirements of the proposal, want to be able to customize the access context path, the project involves the access path of places such as manager-web, push-api and so on, whether it is possible to use a global configuration, such as: system environment variables, run startup parameters specified in the way ?
hi @tomsun28 , according to the requirements of the proposal, want to be able to customize the access
context path, the project involves the access path of places such asmanager-web,push-apiand so on, whether it is possible to use a global configuration, such as: system environment variables, run startup parameters specified in the way ?
๐hi of course. By the way, our project is separated from the front and back ends, but when packaging, we will put the static resource dist of webapp and the backend manager into one container to run.
@tomsun28 Bro, sorry for taking some time to think about the exact way to do this. Idea 1: Static resources in the runtime state can not change the root path of the route of a specific request, my idea is to compile and package the front-end project through the maven plugin of manager-web to compile and combine the front-end project together, does not support the runtime state adjustment. Idea 2 (not recommended): In the runtime state, get the configuration of the backend dynamically, combined with angular interceptor mechanism to intercept & change.
We can discuss it .
hi bro, thanks for taking the time to think about this.๐ For idea 1, the users maybe not know how to complie and build code, most of them use the release package. Recommend to change it at runtime through configuration if possible.
I mistakenly thought it was simple. The root path / of the static resource index.html is a trouble. Change this will cause many resource paths to not be found. For idea 2, it's a solution if it works in theory, but it will take up a lot of your time?
hi bro, thanks for taking the time to think about this.๐ For idea 1, the users maybe not know how to complie and build code, most of them use the release package. Recommend to change it at runtime through configuration if possible.
I mistakenly thought it was simple. The root path
/of the static resourceindex.htmlis a trouble. Change this will cause many resource paths to not be found. For idea 2, it's a solution if it works in theory, but it will take up a lot of your time?
The second idea is workable, give me some time, I'll submit a PR and then you help review it, thanks ~