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:
parent
2caabbe939
commit
2c4c845cd2
6 changed files with 45 additions and 8 deletions
|
@ -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()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue