Add custom http root

Now we are able to let this service run on a different root path.
This commit is contained in:
Thomas Boerger
2019-12-09 14:48:22 +01:00
parent b5a28fe5ed
commit 4e4e873b80
5 changed files with 29 additions and 2 deletions
+7
View File
@@ -120,5 +120,12 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
EnvVar: "OCS_HTTP_ADDR",
Destination: &cfg.HTTP.Addr,
},
&cli.StringFlag{
Name: "http-root",
Value: "/",
Usage: "Root path of http server",
EnvVar: "OCS_HTTP_ROOT",
Destination: &cfg.HTTP.Root,
},
}
}