refactor(infra-monitoring)

refactor(infra-gateway)
This commit is contained in:
stefan
2025-08-11 14:32:01 +02:00
parent d87a5a4a93
commit 582678e226
16 changed files with 282 additions and 115 deletions
@@ -2,13 +2,10 @@ package at.mocode.infrastructure.gateway
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.cloud.client.discovery.EnableDiscoveryClient
@SpringBootApplication
@EnableDiscoveryClient
class GatewayApplication
fun main(args: Array<String>) {
runApplication<GatewayApplication>(*args)
}
@@ -8,6 +8,20 @@ spring:
name: api-gateway
cloud:
gateway:
# HTTP Client-Timeouts für stabile Upstream-Verbindungen
httpclient:
connect-timeout: 5000 # in Millisekunden
response-timeout: 30s
# Globales CORS-Setup (kann pro Umgebung überschrieben werden)
globalcors:
corsConfigurations:
'[/**]':
allowedOrigins: "*"
allowedMethods: "*"
allowedHeaders: "*"
# Antwort-Header bereinigen (verhindert doppelte CORS-Header)
default-filters:
- DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
# Aktiviert die automatische Routen-Erstellung basierend auf Consul
discovery:
locator: