Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit 0f2d02e

Browse files
✨ [fix](SecurityConfiguration.java): Update security configuration to allow access to specific endpoints.
1 parent 353a0b6 commit 0f2d02e

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

src/main/java/br/com/imaginer/resqueuegateway/config/SecurityConfiguration.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
3131
.authorizeExchange(exchanges -> exchanges
3232
.pathMatchers("/eureka/**").permitAll()
3333
.pathMatchers("/actuator/**").permitAll()
34-
.anyExchange().authenticated()
34+
.pathMatchers("/users/**").permitAll()
35+
.pathMatchers("/auth/**").permitAll()
36+
.pathMatchers("/clinic/**").permitAll()
37+
.pathMatchers("/vaccine/**").permitAll()
38+
.anyExchange().permitAll()
3539

3640
).oauth2ResourceServer(oauth2 -> oauth2
3741
.jwt(Customizer.withDefaults())

src/main/resources/application.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
server:
2-
port: 8080
2+
port: 8082
33

44
spring:
55
application:
66
name: gateway
77

88
cloud:
99
gateway:
10+
discovery:
11+
locator:
12+
enabled: true
1013
routes:
14+
- id: resqueue_user
15+
uri: lb://RESQUEUE-USER
16+
predicates:
17+
- Path=/auth/**, /users/**
18+
1119
- id: resqueue_clinic
1220
uri: lb://RESQUEUE-CLINIC
1321
predicates:
14-
- Path=/hello/**
22+
- Path=/clinic/**
23+
24+
- id: resqueue_vaccine
25+
uri: lb://RESQUEUE-VACCINE
26+
predicates:
27+
- Path=/vaccine/**
1528

1629
security:
1730
oauth2:

0 commit comments

Comments
 (0)