This commit is contained in:
Andrea Spacca 2021-11-13 20:45:59 +01:00
parent 53486a474c
commit 1c31ae7558

View file

@ -118,6 +118,7 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
path = strings.Replace(path, "/ggpht", "", 1) path = strings.Replace(path, "/ggpht", "", 1)
path = strings.Replace(path, "/i/", "/", 1) path = strings.Replace(path, "/i/", "/", 1)
proxyURL, err := url.Parse("https://" + host + path) proxyURL, err := url.Parse("https://" + host + path)
if err != nil { if err != nil {
@ -252,9 +253,7 @@ func RelativeUrl(in string) (newurl string) {
} }
func main() { func main() {
if len(os.Args) == 2 { path_prefix = os.Getenv("PREFIX_PATH")
path_prefix = os.Args[1]
}
socket := "socket" + string(os.PathSeparator) + "http-proxy.sock" socket := "socket" + string(os.PathSeparator) + "http-proxy.sock"
syscall.Unlink(socket) syscall.Unlink(socket)