Skip to content

Commit

Permalink
Merge pull request #31 from delta10/fix/set-cache-control-header
Browse files Browse the repository at this point in the history
fix: set cache-control private header
  • Loading branch information
bartjkdp authored Feb 20, 2024
2 parents 59dd0fb + 797409e commit 7cfb5de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/filter-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,13 @@ func main() {
}

w.Header().Set("Content-Type", "application/json")
w.Header().Set("Cache-Control", "private")
w.Write(response)
}
} else {
utils.DelHopHeaders(proxyResp.Header)
utils.CopyHeader(w.Header(), proxyResp.Header)
w.Header().Set("Cache-Control", "private")
w.WriteHeader(proxyResp.StatusCode)
io.Copy(w, proxyResp.Body)
}
Expand Down

0 comments on commit 7cfb5de

Please sign in to comment.