mirror of
				https://github.com/linka-cloud/grpc.git
				synced 2025-11-04 03:21:50 +00:00 
			
		
		
		
	use default unsecured grpc web options
This commit is contained in:
		@@ -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))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user