cmd/horsebot: compress served files
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user