server:
  port: 0

spring:
  application:
    name: api-gateway-test
  main:
    web-application-type: reactive
  autoconfigure:
    exclude:
      # Disable OAuth2 ResourceServer autoconfiguration in tests
      #  use mock JwtAuthenticationFilter instead of real JWT validation
      - org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration
  cloud:
    discovery:
      enabled: false
    consul:
      enabled: false
      config:
        enabled: false
      discovery:
        register: false
    loadbalancer:
      enabled: false
    gateway:
      # IMPORTANT: Do not load production lb:// routes in tests
      server:
        webflux:
          discovery:
            locator:
              enabled: false
          httpclient:
            connect-timeout: 1000
            response-timeout: 5s
          routes:
            [ ]
          globalcors:
            cors-configurations:
              '[/**]':
                allowedOriginPatterns:
                  - "http://localhost:*"
                  - "https://*.meldestelle.at"
                allowedMethods:
                  - GET
                  - POST
                  - PUT
                  - DELETE
                  - PATCH
                  - OPTIONS
                allowedHeaders:
                  - "*"
                allowCredentials: true
                maxAge: 3600

management:
  endpoints:
    web:
      exposure:
        include: health,info
  endpoint:
    health:
      show-details: always
  health:
    circuit breakers:
      enabled: false

logging:
  level:
    org.springframework.cloud.gateway: WARN
    at.mocode.infrastructure.gateway: DEBUG
