This commit is contained in:
Andrea Spacca 2021-11-13 20:45:59 +01:00
parent 53486a474c
commit 1c31ae7558
1 changed files with 2 additions and 3 deletions

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, "/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)