From 276f32264dc89e424914239f2280938c1b1ebf21 Mon Sep 17 00:00:00 2001 From: ewelinagr Date: Tue, 8 Aug 2023 16:30:21 +0200 Subject: [PATCH] Fix "Connection prematurely closed BEFORE response" error. Fix based on https://github.com/spring-cloud/spring-cloud-gateway/issues/2046#issuecomment-1561019873 --- projects/pluto/src/main/resources/application.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/pluto/src/main/resources/application.yml b/projects/pluto/src/main/resources/application.yml index 8a8644a92..66a760046 100644 --- a/projects/pluto/src/main/resources/application.yml +++ b/projects/pluto/src/main/resources/application.yml @@ -33,9 +33,16 @@ spring: default-filters: - RemoveRequestHeader=Pragma X-Frame-Options X-Content-Type-Options X-XSS-Protection X-Permitted-Cross-Domain-Policies Origin # Including the ORIGIN header would trigger CORS filtering downstream, but Pluto is already doing the filtering. + - name: Retry + args: + methods: GET,PUT,POST,DELETE + exceptions: + - reactor.netty.http.client.PrematureCloseException httpclient: connect-timeout: 2000 response-timeout: 600s + pool: + max-idle-time: 20s x-forwarded: port-enabled: false host-enabled: false