add proxy-port for port override when running behind a proxy

Signed-off-by: Adam Crowder <adam@adamcrowder.net>
This commit is contained in:
Adam Crowder
2020-05-03 02:19:32 -07:00
parent 8a5c737140
commit f366e8217e
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))
}