Commit 4950ea1c authored by Steven's avatar Steven

fix: grpc max message size

parent f9258e41
...@@ -69,10 +69,13 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store ...@@ -69,10 +69,13 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
// Create and register RSS routes. // Create and register RSS routes.
rss.NewRSSService(s.Profile, s.Store).RegisterRoutes(rootGroup) rss.NewRSSService(s.Profile, s.Store).RegisterRoutes(rootGroup)
grpcServer := grpc.NewServer(grpc.ChainUnaryInterceptor( grpcServer := grpc.NewServer(
apiv1.NewLoggerInterceptor().LoggerInterceptor, // Override the maximum receiving message size to 100M for uploading large resources.
apiv1.NewGRPCAuthInterceptor(store, secret).AuthenticationInterceptor, grpc.MaxRecvMsgSize(100*1024*1024),
)) grpc.ChainUnaryInterceptor(
apiv1.NewLoggerInterceptor().LoggerInterceptor,
apiv1.NewGRPCAuthInterceptor(store, secret).AuthenticationInterceptor,
))
s.grpcServer = grpcServer s.grpcServer = grpcServer
apiV1Service := apiv1.NewAPIV1Service(s.Secret, profile, store, grpcServer) apiV1Service := apiv1.NewAPIV1Service(s.Secret, profile, store, grpcServer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment