comparison pkg/controllers/proxy.go @ 4829:f4ec3558460e

Set some nosniff http headers.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 06 Nov 2019 18:00:50 +0100
parents b7673a704b0a
children 5f47eeea988d
comparison
equal deleted inserted replaced
4828:39ee00d06309 4829:f4ec3558460e
151 151
152 func proxyModifyResponse(suffix string) func(*http.Response) error { 152 func proxyModifyResponse(suffix string) func(*http.Response) error {
153 153
154 return func(resp *http.Response) error { 154 return func(resp *http.Response) error {
155 155
156 resp.Header.Set("X-Content-Type-Options", "nosniff")
157
156 if !isXML(resp.Header) { 158 if !isXML(resp.Header) {
157 return nil 159 return nil
158 } 160 }
159 161
160 pr, pw := io.Pipe() 162 pr, pw := io.Pipe()