mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update MaxRecvMsgSize
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
"math"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
@@ -74,8 +75,8 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
|
|||||||
rss.NewRSSService(s.Profile, s.Store).RegisterRoutes(rootGroup)
|
rss.NewRSSService(s.Profile, s.Store).RegisterRoutes(rootGroup)
|
||||||
|
|
||||||
grpcServer := grpc.NewServer(
|
grpcServer := grpc.NewServer(
|
||||||
// Override the maximum receiving message size to 100M for uploading large resources.
|
// Override the maximum receiving message size to math.MaxInt32 for uploading large resources.
|
||||||
grpc.MaxRecvMsgSize(100*1024*1024),
|
grpc.MaxRecvMsgSize(math.MaxInt32),
|
||||||
grpc.ChainUnaryInterceptor(
|
grpc.ChainUnaryInterceptor(
|
||||||
apiv1.NewLoggerInterceptor().LoggerInterceptor,
|
apiv1.NewLoggerInterceptor().LoggerInterceptor,
|
||||||
grpcrecovery.UnaryServerInterceptor(),
|
grpcrecovery.UnaryServerInterceptor(),
|
||||||
|
Reference in New Issue
Block a user