MM-40450: Follow redirects in image proxy (#20516)

For the local proxy, we weren't following redirects.
We remove the CheckRedirect function and use the default
function, which is good enough for our purposes.

https://mattermost.atlassian.net/browse/MM-40450

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-06-22 09:12:12 +05:30
коммит произвёл GitHub
родитель 5dfe275fe6
Коммит b5dec4f4d9
2 изменённых файлов: 31 добавлений и 3 удалений

Просмотреть файл

@@ -64,9 +64,6 @@ func makeLocalBackend(proxy *ImageProxy) *LocalBackend {
}
client := proxy.HTTPService.MakeClient(false)
client.CheckRedirect = func(newreq *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
}
return &LocalBackend{
proxy: proxy,