From 1c31ae7558a89bee02945f85555d6a75292a1a20 Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Sat, 13 Nov 2021 20:45:59 +0100 Subject: [PATCH] cr fixes --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 185e475..d24cd18 100644 --- a/main.go +++ b/main.go @@ -118,6 +118,7 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { path = strings.Replace(path, "/ggpht", "", 1) path = strings.Replace(path, "/i/", "/", 1) + proxyURL, err := url.Parse("https://" + host + path) if err != nil { @@ -252,9 +253,7 @@ func RelativeUrl(in string) (newurl string) { } func main() { - if len(os.Args) == 2 { - path_prefix = os.Args[1] - } + path_prefix = os.Getenv("PREFIX_PATH") socket := "socket" + string(os.PathSeparator) + "http-proxy.sock" syscall.Unlink(socket)