use default unsecured grpc web options

This commit is contained in:
Adphi 2021-09-30 18:10:12 +02:00
parent 6594278ead
commit 2916a61b3b

View File

@ -23,7 +23,7 @@ func (s *service) grpcWeb(opts ...grpcweb.Option) error {
if !s.opts.grpcWeb { if !s.opts.grpcWeb {
return nil return nil
} }
h := grpcweb.WrapServer(s.server, opts...) h := grpcweb.WrapServer(s.server, append(defaultWebOptions, opts...)...)
for _, v := range grpcweb.ListGRPCResources(s.server) { for _, v := range grpcweb.ListGRPCResources(s.server) {
if s.opts.grpcWebPrefix != "" { if s.opts.grpcWebPrefix != "" {
s.mux.Handle(s.opts.grpcWebPrefix+v, http.StripPrefix(s.opts.grpcWebPrefix, h)) s.mux.Handle(s.opts.grpcWebPrefix+v, http.StripPrefix(s.opts.grpcWebPrefix, h))