We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f32954 commit 92cdef0Copy full SHA for 92cdef0
components/ws-proxy/pkg/proxy/pass.go
@@ -193,7 +193,9 @@ func createDefaultTransport(config *TransportConfig) *http.Transport {
193
func withLongTermCaching() proxyPassOpt {
194
return func(cfg *proxyPassConfig) {
195
cfg.appendResponseHandler(func(resp *http.Response, req *http.Request) error {
196
- resp.Header.Set("Cache-Control", "public, max-age=31536000")
+ if resp.StatusCode < http.StatusBadRequest {
197
+ resp.Header.Set("Cache-Control", "public, max-age=31536000")
198
+ }
199
return nil
200
})
201
}
0 commit comments