-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to limit HTTP request size? #3059
Comments
Is the title and content the same question? When middleware is processing, the request body has already been parsed |
Perhaps there is a deviation in my understanding of the problem, please provide specific supplements |
I think you can setlimt on gRPC request.if gRPC is limited,the http is also limitted. import "google.golang.org/grpc"
...
s := grpc.NewServer(
grpc.MaxRecvMsgSize(maxReceiveMessageSize),
grpc.MaxSendMsgSize(maxSendMessageSize),
) see dapr/go-sdk#189 |
Hi, @shaofeng66, I'm helping the Kratos team manage their backlog and am marking this issue as stale. The issue pertains to limiting the size of HTTP requests using middleware, with some discussion around the processing of requests and potential solutions such as setting limits on gRPC requests. Could you please confirm if this issue is still relevant to the latest version of the Kratos repository? If it is, please let the Kratos team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you for your understanding and cooperation. |
I achieved by below filter in our server:
|
Thank you, @shaofeng66, for closing this issue! Your contribution is much appreciated.
|
seems not possible to archive this by middleware b/c middlewares are processed after receiving full request?
The text was updated successfully, but these errors were encountered: