Closed bullgare closed 2 years ago
As @utrack shared, it can be done a different way, there is no need to have it here. Let me just close it
Just for the history - DefaultChain is the last-mile middleware chain that is applied right in front of the handler. If you want to add any other middleware, you can always insert it into your router's mw chain. It will handle the request before passing the flow to the DefaultChain.
For now (as of github.com/grpc-ecosystem/grpc-gateway/v2@v2.10.2), PopulateQueryParameters is very strict about query params duplication. And it does not allow urls like
/slug?param1=1¶m1=1
as it has more than one value for the parameter that declared as a single value. So, we would need to handle it before passing the url to PopulateQueryParameters function.The easiest way I see to do this is to update
httpmw.DefaultChain
, but I want to make it optional and configurable.