mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-05-14 03:01:48 +00:00
Fix a nil dereference on non-custom 404 pages.
This commit is contained in:
@@ -268,7 +268,7 @@ func getPage(w http.ResponseWriter, r *http.Request) error {
|
||||
r.Header.Get("Accept-Encoding"))
|
||||
}
|
||||
|
||||
if entry.ContentType != nil {
|
||||
if entry != nil && entry.ContentType != nil {
|
||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||
w.Header().Set("Content-Type", *entry.ContentType)
|
||||
mediaType := getMediaType(*entry.ContentType)
|
||||
|
||||
Reference in New Issue
Block a user