Pass response status from Chrly to the final response

This commit is contained in:
ErickSkrauch 2023-12-21 19:05:26 +01:00
parent 9cad666e9f
commit e84e39eeae
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -85,7 +85,14 @@ func main() {
return return
} }
if profileResp.StatusCode != http.StatusOK && profileResp.StatusCode != http.StatusNoContent {
// TODO: log response
response.WriteHeader(500)
return
}
response.Header().Set("Content-Type", "application/json") response.Header().Set("Content-Type", "application/json")
response.WriteHeader(profileResp.StatusCode)
_, err = io.Copy(response, profileResp.Body) _, err = io.Copy(response, profileResp.Body)
if err != nil { if err != nil {