Merge pull request #307 from cheeseandcereal/add_proxy_port

add proxy-port for port override when running behind a proxy
This commit is contained in:
Andrea Spacca
2020-05-17 19:28:21 +02:00
committed by GitHub
4 changed files with 50 additions and 23 deletions

View File

@ -91,6 +91,12 @@ var globalFlags = []cli.Flag{
Value: "",
EnvVar: "PROXY_PATH",
},
cli.StringFlag{
Name: "proxy-port",
Usage: "port of the proxy when the service is run behind a proxy",
Value: "",
EnvVar: "PROXY_PORT",
},
cli.StringFlag{
Name: "ga-key",
Usage: "key for google analytics (front end)",
@ -299,6 +305,10 @@ func New() *Cmd {
options = append(options, server.ProxyPath(v))
}
if v := c.String("proxy-port"); v != "" {
options = append(options, server.ProxyPort(v))
}
if v := c.String("ga-key"); v != "" {
options = append(options, server.GoogleAnalytics(v))
}