1

Running Spring Cloud gateway (Hoxton.RELEASE) on Spring Boot 2.2.2, running into an issue where we have filtering that builds.... ridiculously long URLs.

The issue we're seeing is that when the URL exceeds roughly 4100 characters, the gateway is reporting this as a bad request and returning a 413 error. I believe this is probably coming from the path rewriting, but that's just a guess at this point.

The actual logged error is in the gateway's log, and the request doesn't reach the application.

[]: 2020-01-08 08:46:39.012 [reactor-http-nio-6] INFO  r.n.h.s.AccessLog 0:0:0:0:0:0:0:1 - - [08/Jan/2020:08:46:39 -0500] "GET /bad-request HTTP/1.0" 413 0 8443 0 ms

Is there a way to configure the allowed size of the request URL that the gateway will process? If I try running the application without the gateway in front of it, it easily supports URLs much longer.

I'm aware that long URLs may not be supported by all browsers and that it's not a good idea anyway, that's another problem to solve. For the time being we're restricted to the URLs generated by a plugin until we can move past that.

Trebla
  • 1,164
  • 1
  • 13
  • 28
  • 1
    Have you found a solution meanwhile? Because I have the exact same problem. – Tobias Neubert Oct 30 '20 at 10:16
  • We did not. We ended up removing the plugin and re-writing the functionality we needed in a way that didn't generate long URLs. – Trebla Nov 02 '20 at 11:56
  • This was the answer in a related post https://stackoverflow.com/questions/67274400/why-am-i-getting-request-entity-too-large-without-file/67274741#67274741 – daniel1171 Jul 21 '21 at 16:25

0 Answers0