mirror of
https://github.com/usememos/memos.git
synced 2024-11-15 03:07:04 +08:00
chore: update MaxRecvMsgSize
This commit is contained in:
parent
d5d37c1d59
commit
2b86069f3b
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"math"
|
||||
"net"
|
||||
"net/http"
|
||||
"time"
|
||||
|
@ -74,8 +75,8 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
|
|||
rss.NewRSSService(s.Profile, s.Store).RegisterRoutes(rootGroup)
|
||||
|
||||
grpcServer := grpc.NewServer(
|
||||
// Override the maximum receiving message size to 100M for uploading large resources.
|
||||
grpc.MaxRecvMsgSize(100*1024*1024),
|
||||
// Override the maximum receiving message size to math.MaxInt32 for uploading large resources.
|
||||
grpc.MaxRecvMsgSize(math.MaxInt32),
|
||||
grpc.ChainUnaryInterceptor(
|
||||
apiv1.NewLoggerInterceptor().LoggerInterceptor,
|
||||
grpcrecovery.UnaryServerInterceptor(),
|
||||
|
|
Loading…
Reference in a new issue