polygerrit-ui: serve on "localhost:8081" rather than ":8081".

The address ":8081" includes all network interfaces. Limiting to
"localhost" will avoid serving the content to security scanners.

Change-Id: I0a05f2136b4ec9cba4d9ed1b334b0de825831977
This commit is contained in:
Han-Wen Nienhuys 2019-12-11 16:27:24 +01:00
parent 6b92574bf2
commit e982d2c4b1

View File

@ -39,12 +39,12 @@ import (
var (
plugins = flag.String("plugins", "", "comma seperated plugin paths to serve")
port = flag.String("port", ":8081", "Port to serve HTTP requests on")
port = flag.String("port", "localhost:8081", "address to serve HTTP requests on")
host = flag.String("host", "gerrit-review.googlesource.com", "Host to proxy requests to")
scheme = flag.String("scheme", "https", "URL scheme")
cdnPattern = regexp.MustCompile("https://cdn.googlesource.com/polygerrit_ui/[0-9.]*")
webComponentPattern = regexp.MustCompile("webcomponentsjs-p2")
grAppPattern = regexp.MustCompile("gr-app-p2")
grAppPattern = regexp.MustCompile("gr-app-p2")
bundledPluginsPattern = regexp.MustCompile("https://cdn.googlesource.com/polygerrit_assets/[0-9.]*")
)