1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(backend): make swarm api endpoint admin user protected (#991)

This commit is contained in:
Glowbal 2017-07-08 10:34:04 +02:00 committed by Anthony Lapenna
parent 90a32d1b67
commit 9909b6d481
2 changed files with 11 additions and 0 deletions

View file

@ -85,6 +85,11 @@ func rewriteResponse(response *http.Response, newResponseData interface{}, statu
response.StatusCode = statusCode
response.Body = body
response.ContentLength = int64(len(jsonData))
if response.Header == nil {
response.Header = make(http.Header)
}
response.Header.Set("Content-Length", strconv.Itoa(len(jsonData)))
return nil
}