Allow to disable swagger (#2093)

https://github.com/woodpecker-ci/woodpecker/issues/1944
This commit is contained in:
qwerty287
2023-08-03 02:42:30 +02:00
committed by GitHub
parent f06e0acdc6
commit 1a7f7a9427
9 changed files with 40 additions and 9 deletions

View File

@@ -272,6 +272,11 @@ var flags = []cli.Flag{
Name: "migrations-allow-long",
Value: false,
},
&cli.BoolFlag{
EnvVars: []string{"WOODPECKER_ENABLE_SWAGGER"},
Name: "enable-swagger",
Value: true,
},
//
// resource limit parameters
//

View File

@@ -364,6 +364,7 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) {
server.Config.Pipeline.Volumes = c.StringSlice("volume")
server.Config.Pipeline.Privileged = c.StringSlice("escalate")
server.Config.Server.Migrations.AllowLong = c.Bool("migrations-allow-long")
server.Config.Server.EnableSwagger = c.Bool("enable-swagger")
// prometheus
server.Config.Prometheus.AuthToken = c.String("prometheus-auth-token")