Skip to content

Commit e137921

Browse files
authored
Merge pull request #5956 from junotx/grpc-http
fix(server): mount grpcWebMux with StripPrefix to match grpc gateway routes
2 parents 395a179 + e3b7c98 commit e137921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func (s *Server) ListenAndServe(
131131
internalMux := chi.NewRouter()
132132

133133
internalMux.Route(pathPrefix+"/", func(r chi.Router) {
134-
r.Mount("/api", grpcWebMux)
134+
r.Mount("/api", http.StripPrefix(pathPrefix+"/api", grpcWebMux))
135135

136136
r.Handle("/metrics", promhttp.HandlerFor(s.reg, promhttp.HandlerOpts{}))
137137

0 commit comments

Comments
 (0)