(storage *model.Storage, reqPath string)
| 143 | } |
| 144 | |
| 145 | func GenerateDownProxyURL(storage *model.Storage, reqPath string) string { |
| 146 | if storage.DownProxyURL == "" { |
| 147 | return "" |
| 148 | } |
| 149 | query := "" |
| 150 | if !storage.DisableProxySign { |
| 151 | query = "?sign=" + sign.Sign(reqPath) |
| 152 | } |
| 153 | return fmt.Sprintf("%s%s%s", |
| 154 | strings.Split(storage.DownProxyURL, "\n")[0], |
| 155 | utils.EncodePath(reqPath, true), |
| 156 | query, |
| 157 | ) |
| 158 | } |
no test coverage detected