From d99be34251432dca0ff6bd5d57b39a1d867d2444 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Fri, 1 Nov 2019 18:57:14 -0700 Subject: [PATCH] use path package for matching content type content type always uses forward slash, so path is the right package to use. fixes #191 --- imageproxy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imageproxy.go b/imageproxy.go index 052533f..d7b77dd 100644 --- a/imageproxy.go +++ b/imageproxy.go @@ -30,7 +30,7 @@ import ( "mime" "net/http" "net/url" - "path/filepath" + "path" "strings" "time" @@ -280,7 +280,7 @@ func contentTypeMatches(patterns []string, contentType string) bool { } for _, pattern := range patterns { - if ok, err := filepath.Match(pattern, contentType); ok && err == nil { + if ok, err := path.Match(pattern, contentType); ok && err == nil { return true } }