Skip to content

Commit 8fa2d9f

Browse files
authored
Pin spring-cloud-starter-gateway version and disable forwarded headers (#304)
- Pin spring-cloud-starter-gateway to version 3.1.9 in api-gateway pom.xml - Disable forwarded and x-forwarded headers in gateway configuration to prevent header manipulation
1 parent 83bdafa commit 8fa2d9f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

spring-petclinic-api-gateway/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<dependency>
6464
<groupId>org.springframework.cloud</groupId>
6565
<artifactId>spring-cloud-starter-gateway</artifactId>
66+
<version>3.1.9</version>
6667
</dependency>
6768
<dependency>
6869
<groupId>org.springframework</groupId>

spring-petclinic-api-gateway/src/main/resources/application.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ spring:
33
name: api-gateway
44
config:
55
import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/}
6+
cloud:
7+
gateway:
8+
forwarded:
9+
enabled: false
10+
x-forwarded:
11+
enabled: false
612

713
eureka:
814
instance:

0 commit comments

Comments
 (0)