Files
spring-boot-microservices-p…/cloud-2026-upgrade/steps/03-trusted-proxies.patch
T

15 lines
683 B
Diff

diff --git a/config-server/src/main/resources/config/gateway.yml b/config-server/src/main/resources/config/gateway.yml
index 470bee1..fb2907d 100644
--- a/config-server/src/main/resources/config/gateway.yml
+++ b/config-server/src/main/resources/config/gateway.yml
@@ -4,6 +4,9 @@ spring:
gateway:
server:
webmvc:
+ # Regex matched against the caller's IP AND every address in X-Forwarded-For / Forwarded for=.
+ # Empty (the default here) switches the forwarding filters off: nothing is forwarded upstream.
+ trusted-proxies: ${TRUSTED_PROXIES:}
routes:
- id: products
uri: lb://product-service