From 5ec483a21f6574322482530211ea6383b1990ec5 Mon Sep 17 00:00:00 2001 From: yashsinghcodes Date: Thu, 15 Aug 2024 01:39:39 +0530 Subject: [PATCH] git no-proxy --- backend/go-app/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/go-app/main.go b/backend/go-app/main.go index f2407a37..7219b351 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -397,7 +397,7 @@ func checkUsername(Username string) error { return nil } -func isNoProxy(rawURL string) bool { +func isGitNoProxy(rawURL string) bool { noProxy := os.Getenv("NO_PROXY") if noProxy == "" { return false @@ -428,13 +428,13 @@ func isNoProxy(rawURL string) bool { } func checkGitProxy(cloneOptions *git.CloneOptions) *git.CloneOptions { - if os.Getenv("HTTP_PROXY") != "" && !isNoProxy(cloneOptions.URL){ + if os.Getenv("HTTP_PROXY") != "" && !isGitNoProxy(cloneOptions.URL){ cloneOptions.ProxyOptions = gitProxy.ProxyOptions{ URL: os.Getenv("HTTP_PROXY"), } } - if os.Getenv("HTTPS_PROXY") != "" && !isNoProxy(cloneOptions.URL) { + if os.Getenv("HTTPS_PROXY") != "" && !isGitNoProxy(cloneOptions.URL) { cloneOptions.ProxyOptions = gitProxy.ProxyOptions{ URL: os.Getenv("HTTPS_PROXY"), }