fix: Correctly set the Content-Type header

This commit is contained in:
PapaTutuWawa 2024-01-01 14:52:33 +01:00
parent c4ef20f513
commit 12aef17cc0

View File

@ -124,7 +124,7 @@ func ServeFile(username, reponame, path, giteaUrl string, w http.ResponseWriter)
)
log.Debugf("Page %s requested from Gitea and cached in memory at %v", path, now)
w.WriteHeader(200)
w.Header().Set("Content-Type", mimeType)
w.WriteHeader(200)
w.Write(content)
}