MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / prepareNoCache

Function prepareNoCache

oauthproxy.go:1096–1101  ·  view source on GitHub ↗

prepareNoCache prepares headers for preventing browser caching.

(w http.ResponseWriter)

Source from the content-addressed store, hash-verified

1094
1095// prepareNoCache prepares headers for preventing browser caching.
1096func prepareNoCache(w http.ResponseWriter) {
1097 // Set NoCache headers
1098 for k, v := range noCacheHeaders {
1099 w.Header().Set(k, v)
1100 }
1101}
1102
1103func prepareNoCacheMiddleware(next http.Handler) http.Handler {
1104 return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {

Callers 4

SignInPageMethod · 0.85
doOAuthStartMethod · 0.85
prepareNoCacheMiddlewareFunction · 0.85
Test_prepareNoCacheFunction · 0.85

Calls 1

SetMethod · 0.65

Tested by 1

Test_prepareNoCacheFunction · 0.68