We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5eb9a37 commit 092440eCopy full SHA for 092440e
1 file changed
main.go
@@ -147,19 +147,6 @@ func setContentType(r *http.Request, resp *http.Response) {
147
mime = proxySettings.ExtMimeTypes[rext[1:]]
148
}
149
150
- if mime == "" {
151
- //Finally, just use the default type
152
- mime = proxySettings.ExtMimeTypes["default"]
153
- }
154
-
155
- // If mime isn't accepted (and an accept header is given), then falsify the mime type
156
- accepted := r.Header.Get("Accept")
157
- if accepted != "" {
158
- if !strings.Contains(accepted, mime) {
159
- mime = strings.Split(accepted, ",")[0]
160
161
162
163
// Set content type header
164
resp.Header.Set("Content-Type", mime)
165
0 commit comments