Spring Cloud Gateway MVC - Incorrectly proxying multipart/form-data

Viewed 265

Our team is upgrading our Spring application and we are having to remove Zuul as Spring Cloud have dropped it in favor of Spring Cloud Gateway. Other constraints require that we use the MVC version of Spring Cloud Gateway.

We're currently having issues uploading files via the gateway as when the backend service receives the request, it is an octet-stream and not a multipart/form-data request. With Zuul we utilised the ability to avoid the Spring Dispatch Servlet by prefixing file upload paths with /zuul (GitHub source). Attempting to replicate this behavior with the new Cloud Gateway is proving difficult, is there an alternative/recommended way to upload large files with Spring Cloud Gateway MVC?

We are using the gateway within a controller and calling the function on ProxyExchange<byte[]> proxy based on the incoming request.

0 Answers
Related