cmd/horsebot: compress served files

This commit is contained in:
2026-03-31 23:45:44 -04:00
parent ccef87f0a3
commit d0aec5c501
3 changed files with 5 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/disgoorg/disgo/handler/middleware"
"github.com/disgoorg/disgo/httpserver"
"github.com/disgoorg/disgo/rest"
httpmiddle "github.com/go-chi/chi/v5/middleware"
"git.sunturtle.xyz/zephyr/horse/horse"
)
@@ -111,7 +112,7 @@ func main() {
}
mux := http.NewServeMux()
mux.Handle("GET /", http.FileServerFS(os.DirFS(public)))
mux.Handle("GET /", httpmiddle.Compress(5)(http.FileServerFS(os.DirFS(public))))
if pubkey != "" {
pk, err := hex.DecodeString(pubkey)
if err != nil {