Skip to content

feat: gzip static http server assets #2272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use chi/middleware
  • Loading branch information
coadler committed Jun 13, 2022
commit 1bf95d2b7b948e729c30fa0b0b8ff77760a1f166
3 changes: 1 addition & 2 deletions coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"sync"
"time"

"github.com/NYTimes/gziphandler"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/pion/webrtc/v3"
Expand Down Expand Up @@ -352,7 +351,7 @@ func New(options *Options) *API {
})
})

r.NotFound(gziphandler.GzipHandler(http.HandlerFunc(api.siteHandler.ServeHTTP)).ServeHTTP)
r.NotFound(middleware.Compress(5, "gzip", "deflate")(http.HandlerFunc(api.siteHandler.ServeHTTP)).ServeHTTP)
return api
}

Expand Down