mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 00:10:49 +00:00
Support path prefix (#1714)
closes #1636 closes #1429 supersedes #1586 Uses a different approach: just take the index.html compiled by vite and replace the paths to js and other files using regex. This is not compatible with the dev proxy which is also the reason why we can't use go templates for this.
This commit is contained in:
@@ -45,6 +45,11 @@ var flags = []cli.Flag{
|
||||
Name: "server-host",
|
||||
Usage: "server fully qualified url (<scheme>://<host>)",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
EnvVars: []string{"WOODPECKER_ROOT_URL"},
|
||||
Name: "root-url",
|
||||
Usage: "server url root (used for statics loading when having a url path prefix)",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
EnvVars: []string{"WOODPECKER_SERVER_ADDR"},
|
||||
Name: "server-addr",
|
||||
|
@@ -354,6 +354,7 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) {
|
||||
server.Config.Server.StatusContext = c.String("status-context")
|
||||
server.Config.Server.StatusContextFormat = c.String("status-context-format")
|
||||
server.Config.Server.SessionExpires = c.Duration("session-expires")
|
||||
server.Config.Server.RootURL = strings.TrimSuffix(c.String("root-url"), "/")
|
||||
server.Config.Pipeline.Networks = c.StringSlice("network")
|
||||
server.Config.Pipeline.Volumes = c.StringSlice("volume")
|
||||
server.Config.Pipeline.Privileged = c.StringSlice("escalate")
|
||||
|
Reference in New Issue
Block a user