fixup! Improve restart on 403 forbidden try restart 10 times

Signed-off-by: Pierre-Emmanuel Jacquier <pierre-emmanuel.jacquier@epitech.eu>
This commit is contained in:
Pierre-Emmanuel Jacquier
2019-03-19 23:37:29 +01:00
parent 02ed29b056
commit a39a06321d

View File

@@ -102,6 +102,8 @@ func (p *proxy) reverseProxy(c *gin.Context) {
if resp.StatusCode == http.StatusForbidden && forbiddenRestart > 0 {
forbiddenRestart--
return true
} else if resp.StatusCode == http.StatusForbidden {
return false
}
copyHTTPHeader(c, resp.Header)