|
|
@@ -654,6 +654,14 @@ func TestShouldProxifyURLWithMimeType(t *testing.T) {
|
|
|
mediaProxyResourceTypes: []string{"image"},
|
|
|
expected: true,
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "URL with uppercase MIME type should be proxified",
|
|
|
+ mediaURL: "http://example.com/image.jpg",
|
|
|
+ mediaMimeType: "Image/JPEG",
|
|
|
+ mediaProxyOption: "all",
|
|
|
+ mediaProxyResourceTypes: []string{"image"},
|
|
|
+ expected: true,
|
|
|
+ },
|
|
|
{
|
|
|
name: "URL with audio MIME type and audio resource type should be proxified",
|
|
|
mediaURL: "http://example.com/song.ogg",
|
|
|
@@ -662,6 +670,14 @@ func TestShouldProxifyURLWithMimeType(t *testing.T) {
|
|
|
mediaProxyResourceTypes: []string{"audio"},
|
|
|
expected: true,
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "URL with mixed-case audio MIME type should be proxified",
|
|
|
+ mediaURL: "http://example.com/song.ogg",
|
|
|
+ mediaMimeType: "AuDiO/Ogg",
|
|
|
+ mediaProxyOption: "all",
|
|
|
+ mediaProxyResourceTypes: []string{"audio"},
|
|
|
+ expected: true,
|
|
|
+ },
|
|
|
{
|
|
|
name: "URL with video MIME type and video resource type should be proxified",
|
|
|
mediaURL: "http://example.com/movie.webm",
|