nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
67.28k stars 7.59k forks source link

It's not possible to set the gRPC max metadata size #4237

Closed dot-i closed 4 years ago

dot-i commented 4 years ago

Feature Request

Is your feature request related to a problem? Please describe.

There is currently no way to change the default maximum metadata size for gRPC and it will always be set at the default (4KB).

Describe the solution you'd like

Add a maxMetadataSize on GrpcOptions to override the default of 4KB, in number of bytes.

PR #4230 fixes this.

What is the motivation / use case for changing the behavior?

4KB is not a lot these days 😉 In our case we send a JWT token over the wire using the metadata, just like you would use an HTTP header on REST calls. Our JWT tokens can sometimes grow in size depending on the user, causing the entire metadata to exceed 4KB.

If this happens this is a blocking issue since we currently can't increase the metadata size on the gRPC server that is created by NestJS.

dot-i commented 4 years ago

Could someone take a look at this? It's quite a blocking issue for us, and it's such a simple change after all 😄

kamilmysliwiec commented 4 years ago

Added in 7.0.6

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.