mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-08-17 09:26:04 +00:00
Use filename, not URL path, for MIME type sniffing.
Otherwise, even though `/foo/index.html` and `/foo` are identical resources in every way, their MIME type could differ.
This commit is contained in:
+1
-1
@@ -202,7 +202,7 @@ func getPage(w http.ResponseWriter, r *http.Request) error {
|
||||
// see https://web.dev/articles/stale-while-revalidate for details
|
||||
|
||||
// http.ServeContent handles content type and caching
|
||||
http.ServeContent(w, r, sitePath, mtime, reader)
|
||||
http.ServeContent(w, r, entryPath, mtime, reader)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user