1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

http/response: add brotli compression support

This commit is contained in:
Frédéric Guillot 2024-04-19 11:43:20 -07:00
parent 2caabbe939
commit 2c4c845cd2
6 changed files with 45 additions and 8 deletions

View file

@ -31,12 +31,12 @@ func (h *handler) showAppIcon(w http.ResponseWriter, r *http.Request) {
switch filepath.Ext(filename) {
case ".png":
b.WithoutCompression()
b.WithHeader("Content-Type", "image/png")
case ".svg":
b.WithHeader("Content-Type", "image/svg+xml")
}
b.WithoutCompression()
b.WithBody(blob)
b.Write()
})