mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-12 23:53:19 +02:00
Gzip static responses
This commit is contained in:
parent
160c72997f
commit
488aeb119b
4 changed files with 95 additions and 2 deletions
server
|
@ -351,12 +351,12 @@ var config = {
|
|||
|
||||
func (s *Server) handleStatic(w http.ResponseWriter, r *http.Request) error {
|
||||
r.URL.Path = webSiteDir + r.URL.Path
|
||||
http.FileServer(http.FS(webFsCached)).ServeHTTP(w, r)
|
||||
util.Gzip(http.FileServer(http.FS(webFsCached))).ServeHTTP(w, r)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Server) handleDocs(w http.ResponseWriter, r *http.Request) error {
|
||||
http.FileServer(http.FS(docsStaticCached)).ServeHTTP(w, r)
|
||||
util.Gzip(http.FileServer(http.FS(docsStaticCached))).ServeHTTP(w, r)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue