app:
  jwtSecret: mySecretKey
  jwtExpirationMs: 86000000
  authentication:
    check: true
    bypass:
      url: /asset/relation,/dictionary,/graph,/assetlib,/auth,/assetTextSearch,/termExplanation
  token:
    bypass:
      url: /api/auth/login,/graph/get,/graph/list,/asset/characterDicLib/esDicQuery    

server:
  port: 8080


spring:
    main:
        allow-bean-definition-overriding: true
        web-application-type: REACTIVE
    cloud:
        gateway:
            discovery:
                locator:
                    enabled: true
            globalcors:
                add-to-simple-url-handler-mapping: true
                cors-configurations:
                    '[/**]':
                        # 下面的 endpoint 必须有端口号，否则会 block 前端的请求。多个 endpoints 可以用逗号分隔。
                        allowedOrigins: "*"
                        allowedHeaders:
                            - content-type
                            - Access-Control-Allow-Origin
                            - Access-Control-Allow-Headers
                            - Authorization
                        allowedMethods:
                            - GET
                            - PUT
                            - POST
                            - PATCH
                            - DELETE
                            - OPTIONS
            routes:       
                - id: auth-router
                  uri: lb://auth-service
                  filters:
                      - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
                  predicates:
                      - Path=/api/auth/**      
                - id: asset-mgnt-router
                  uri: lb://asset-mgnt-service
                  filters:
                      - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
                      #- SwaggerHeaderFilter
                  predicates:
                      - Path=/asset/**,/dictionary/**,/graph/**,/assetTextSearch/**,/termExplanation/**,/meta/**
                - id: platform-mgnt-router
                  uri: lb://platform-mgnt-service
                  filters:
                      - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
                      - StripPrefix=1
                  predicates:
                      - Path=/platform/**
                
                - id: fast-api-router
                  uri: http://10.0.8.8:8044
                  filters:
                      - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
                      - StripPrefix=1
                  predicates:
                      - Path=/fast-api/**

                - id: flowable-router
                  uri: lb://ea-flowable
                  filters:
                      - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
                      - StripPrefix=1
                  predicates:
                      - Path=/flow/**                
management:
    endpoint:
        gateway:
            enabled: true
        health:
            show-details: always
        web:
            exposure:
                include: '*'