ShouldProxy TODO need optimize when should be proxy? 1. config.MustProxy() 2. storage.WebProxy 3. proxy_types
(storage driver.Driver, filename string)
| 90 | // 2. storage.WebProxy |
| 91 | // 3. proxy_types |
| 92 | func ShouldProxy(storage driver.Driver, filename string) bool { |
| 93 | if storage.Config().MustProxy() || storage.GetStorage().WebProxy { |
| 94 | return true |
| 95 | } |
| 96 | if utils.SliceContains(conf.SlicesMap[conf.ProxyTypes], utils.Ext(filename)) { |
| 97 | return true |
| 98 | } |
| 99 | return false |
| 100 | } |
no test coverage detected