Updated gateway cors
This commit is contained in:
@@ -15,10 +15,24 @@ spring:
|
|||||||
# 3. Gateway Routing (Modern WebFlux Namespace)
|
# 3. Gateway Routing (Modern WebFlux Namespace)
|
||||||
cloud:
|
cloud:
|
||||||
gateway:
|
gateway:
|
||||||
server:
|
globalcors:
|
||||||
webflux:
|
cors-configurations:
|
||||||
|
'[/**]':
|
||||||
|
allowedOrigins:
|
||||||
|
- "http://localhost:3000"
|
||||||
|
- "https://kilimo.farm"
|
||||||
|
allowedMethods:
|
||||||
|
- GET
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- DELETE
|
||||||
|
- OPTIONS
|
||||||
|
allowedHeaders:
|
||||||
|
- "*"
|
||||||
|
allowCredentials: true
|
||||||
|
maxAge: 3600 # cache preflight response for 1 hour
|
||||||
|
|
||||||
routes:
|
routes:
|
||||||
# --- Core Service Route ---
|
|
||||||
- id: kilimo_core_service
|
- id: kilimo_core_service
|
||||||
uri: http://localhost:9081
|
uri: http://localhost:9081
|
||||||
predicates:
|
predicates:
|
||||||
@@ -32,7 +46,6 @@ spring:
|
|||||||
redis-rate-limiter.burstCapacity: 20
|
redis-rate-limiter.burstCapacity: 20
|
||||||
key-resolver: "#{@userKeyResolver}"
|
key-resolver: "#{@userKeyResolver}"
|
||||||
|
|
||||||
# --- Assistant Service Route ---
|
|
||||||
- id: kilimo_assistant_service
|
- id: kilimo_assistant_service
|
||||||
uri: http://localhost:9082
|
uri: http://localhost:9082
|
||||||
predicates:
|
predicates:
|
||||||
@@ -45,24 +58,6 @@ spring:
|
|||||||
redis-rate-limiter.replenishRate: 10
|
redis-rate-limiter.replenishRate: 10
|
||||||
redis-rate-limiter.burstCapacity: 20
|
redis-rate-limiter.burstCapacity: 20
|
||||||
key-resolver: "#{@userKeyResolver}"
|
key-resolver: "#{@userKeyResolver}"
|
||||||
globalcors:
|
|
||||||
cors-configurations:
|
|
||||||
'[/**]':
|
|
||||||
allowedOrigins:
|
|
||||||
- "http://localhost:3000"
|
|
||||||
- "http://127.0.0.1:3000"
|
|
||||||
- "https://vm-qpse3mho5qps7fj2kw0hzy.vusercontent.net"
|
|
||||||
- "https://www.kilimo.farm"
|
|
||||||
- "https://kilimo.farm"
|
|
||||||
allowedMethods:
|
|
||||||
- GET
|
|
||||||
- POST
|
|
||||||
- PUT
|
|
||||||
- DELETE
|
|
||||||
- OPTIONS
|
|
||||||
allowedHeaders:
|
|
||||||
- "*"
|
|
||||||
allowCredentials: true
|
|
||||||
|
|
||||||
# 4. Actuator for Troubleshooting
|
# 4. Actuator for Troubleshooting
|
||||||
management:
|
management:
|
||||||
|
|||||||
Reference in New Issue
Block a user