Add origin width & height to debug headers

This commit is contained in:
DarthSim
2021-10-05 15:27:06 +06:00
parent b27f0d5712
commit 38ca14230d
3 changed files with 35 additions and 2 deletions

View File

@@ -99,6 +99,8 @@ func respondWithImage(reqID string, r *http.Request, rw http.ResponseWriter, res
if config.EnableDebugHeaders {
rw.Header().Set("X-Origin-Content-Length", strconv.Itoa(len(originData.Data)))
rw.Header().Set("X-Origin-Width", resultData.Headers["X-Origin-Width"])
rw.Header().Set("X-Origin-Height", resultData.Headers["X-Origin-Height"])
}
rw.Header().Set("Content-Length", strconv.Itoa(len(resultData.Data)))