fix: deleted image wrongfully caching
This commit is contained in:
1 parent
b3793d5dbb
commit
ff0854f331
19 files changed
+201
-87
No files matched your search
@@ -64,7 +64,7 @@ func TestServeUploadedImagesHttp(t *testing.T) {
|
||||
if got := rec.Header().Get("Content-Type"); got != example.contentType {
|
||||
t.Fatalf("expected Content-Type %q, got %q", example.contentType, got)
|
||||
}
|
||||
if got := rec.Header().Get("Cache-Control"); got != "public, max-age=31536000, immutable" {
|
||||
if got := rec.Header().Get("Cache-Control"); got != "public, no-cache" {
|
||||
t.Fatalf("unexpected Cache-Control: %q", got)
|
||||
}
|
||||
if got := rec.Header().Get("X-Content-Type-Options"); got != "nosniff" {
|
||||
@@ -96,7 +96,7 @@ func TestServeUploadedImagesHttp(t *testing.T) {
|
||||
if got := rec.Header().Get("Content-Type"); got != "image/svg+xml" {
|
||||
t.Fatalf("expected Content-Type image/svg+xml, got %q", got)
|
||||
}
|
||||
if got := rec.Header().Get("Cache-Control"); got != "public, max-age=31536000, immutable" {
|
||||
if got := rec.Header().Get("Cache-Control"); got != "public, no-cache" {
|
||||
t.Fatalf("unexpected Cache-Control: %q", got)
|
||||
}
|
||||
if got := rec.Header().Get("X-Content-Type-Options"); got != "nosniff" {
|
||||
@@ -237,7 +237,7 @@ func TestServeUploadedImagesHttp(t *testing.T) {
|
||||
if got := rec.Header().Get("Content-Type"); got != "image/webp" {
|
||||
t.Fatalf("expected Content-Type image/webp, got %q", got)
|
||||
}
|
||||
if got := rec.Header().Get("Cache-Control"); got != "public, max-age=31536000, immutable" {
|
||||
if got := rec.Header().Get("Cache-Control"); got != "public, no-cache" {
|
||||
t.Fatalf("unexpected Cache-Control: %q", got)
|
||||
}
|
||||
if got := rec.Header().Get("X-Content-Type-Options"); got != "nosniff" {
|
||||
|
||||
Reference in new issue
Block a user