Always set content-type & nosniff
This commit is contained in:
@@ -552,6 +552,8 @@ func (s *ProxyServer) Run() error {
|
||||
proxyMux := mux.NewPathRecorderMux("kube-proxy")
|
||||
healthz.InstallHandler(proxyMux)
|
||||
proxyMux.HandleFunc("/proxyMode", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||
fmt.Fprintf(w, "%s", s.ProxyMode)
|
||||
})
|
||||
proxyMux.Handle("/metrics", legacyregistry.Handler())
|
||||
|
||||
Reference in New Issue
Block a user