Spring Cloud API Gateway routing not working after upgrading to version 2.4.4
search cancel

Spring Cloud API Gateway routing not working after upgrading to version 2.4.4

book

Article ID: 443388

calendar_today

Updated On:

Products

VMware Tanzu Platform Spring

Issue/Introduction

The customer upgraded from API Gateway 2.3.3 to 2.4.4 and they reported the gateway routing didn't work and it worked after setting "server.forward_headers_strategy: none" in environment variables.

You are receiving a 500 response code. 

 

Cause

Spring Cloud Gateway is not doing any rewriting or rerouting but it uses reactor-netty library that behaves where is doing a rewrite before reaching any Spring Cloud Gateway specific code.

Resolution

To resolve this issue:

Setting environment variable SERVER_FORWARD_HEADERS_STRATEGY to none as a temporary fix:

cf update-service <sgw-service-instance-name> -c '{"env":{"SERVER_FORWARD_HEADERS_STRATEGY":"none"}}'

For a permanent fix, please upgrade to Spring Cloud Gateway version 2.4.6.