summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/proxy/proxy.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/proxy/proxy.go b/modules/proxy/proxy.go
index 0ab6ed3341..61730544b0 100644
--- a/modules/proxy/proxy.go
+++ b/modules/proxy/proxy.go
@@ -56,7 +56,9 @@ func Match(u string) bool {
// Proxy returns the system proxy
func Proxy() func(req *http.Request) (*url.URL, error) {
if !setting.Proxy.Enabled {
- return nil
+ return func(req *http.Request) (*url.URL, error) {
+ return nil, nil
+ }
}
if setting.Proxy.ProxyURL == "" {
return http.ProxyFromEnvironment