We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19478e8 commit cba58eaCopy full SHA for cba58ea
1 file changed
config/config.go
@@ -63,14 +63,11 @@ func SetUpLocations() error {
63
64
func isValidHeader(r *http.Response) bool {
65
contentType := r.Header.Get("Content-Type")
66
- if !strings.HasPrefix(contentType, "text/html") {
67
- return false
68
- }
69
- return true
+ return strings.HasPrefix(contentType, "text/html")
70
}
71
72
func modifyResponse(r *http.Response) error {
73
- if isValidHeader(r) {
+ if !isValidHeader(r) {
74
err := errors.New("Unexpected Content-Type")
75
logger.Error(err)
76
return err
0 commit comments