File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ require (
1717 github.com/golang-module/carbon/v2 v2.1.8
1818 github.com/google/go-cmp v0.5.8
1919 github.com/google/uuid v1.3.0
20+ github.com/gorilla/handlers v1.4.2
2021 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
2122 github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
2223 github.com/jackc/pgconn v1.8.0
Original file line number Diff line number Diff line change @@ -708,6 +708,7 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR
708708github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY =
709709github.com/gorilla/css v1.0.0 /go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c =
710710github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33 /go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ =
711+ github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg =
711712github.com/gorilla/handlers v1.4.2 /go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ =
712713github.com/gorilla/mux v1.7.2 /go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs =
713714github.com/gorilla/mux v1.7.3 /go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs =
Original file line number Diff line number Diff line change 99 "strings"
1010 "time"
1111
12+ "github.com/gorilla/handlers"
1213 grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
1314 grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus"
1415 grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
@@ -26,6 +27,7 @@ import (
2627 "github.com/raystack/salt/mux"
2728 "google.golang.org/grpc"
2829 "google.golang.org/grpc/credentials/insecure"
30+ _ "google.golang.org/grpc/encoding/gzip" // Install the gzip compressor
2931 "google.golang.org/grpc/health/grpc_health_v1"
3032 "google.golang.org/grpc/reflection"
3133 "google.golang.org/protobuf/encoding/protojson"
@@ -161,7 +163,7 @@ func Serve(
161163 if err := mux .Serve (
162164 ctx ,
163165 mux .WithHTTPTarget (config .addr (), & http.Server {
164- Handler : gwmux ,
166+ Handler : handlers . CompressHandler ( gwmux ) ,
165167 ReadTimeout : 60 * time .Second ,
166168 WriteTimeout : 60 * time .Second ,
167169 IdleTimeout : 120 * time .Second ,
You can’t perform that action at this time.
0 commit comments