Skip to content

Commit b8530b6

Browse files
committed
fix(serverHandler/asset): render asset without condition
As `http.ServerContent` has its own logic for detecting request method and skip output content body for `HEAD` method, remove custom detection logic.
1 parent 0cc9071 commit b8530b6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/serverHandler/asset.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@ func (h *handler) asset(w http.ResponseWriter, r *http.Request, assetPath string
88
header := w.Header()
99
header.Set("X-Content-Type-Options", "nosniff")
1010
header.Set("Cache-Control", "public, max-age=3600")
11-
if needResponseBody(r.Method) {
12-
h.theme.RenderAsset(w, r, assetPath)
13-
}
11+
h.theme.RenderAsset(w, r, assetPath)
1412
}

0 commit comments

Comments
 (0)