diff --git a/polygerrit-ui/server.go b/polygerrit-ui/server.go index cb6d236604..33f33b793f 100644 --- a/polygerrit-ui/server.go +++ b/polygerrit-ui/server.go @@ -32,6 +32,7 @@ var ( restHost = flag.String("host", "gerrit-review.googlesource.com", "Host to proxy requests to") port = flag.String("port", ":8081", "Port to serve HTTP requests on") prod = flag.Bool("prod", false, "Serve production assets") + scheme = flag.String("scheme", "https", "URL scheme") ) func main() { @@ -57,7 +58,7 @@ func handleRESTProxy(w http.ResponseWriter, r *http.Request) { req := &http.Request{ Method: "GET", URL: &url.URL{ - Scheme: "https", + Scheme: *scheme, Host: *restHost, Opaque: r.URL.EscapedPath(), RawQuery: r.URL.RawQuery,