server:
  port: 6000
spring:
  application:
    name: gateway
  profiles:
    active: @profile.active@
  cloud:
    loadbalancer:
      ribbon:
        enabled: false
    gateway:
      routes:
        - id: account-router
          # spring-cloud-starter-zookeeper-discovery 提供服务发现功能
          uri: lb://account-service
          predicates:
            - Path=/api/account/**
          filters:
            - StripPrefix=0
        - id: static-router
          uri: lb://account-service
          predicates:
            - Path=/dist/images/**
          filters:
            - StripPrefix=0
        - id: auth-router
          uri: lb://account-service
          predicates:
            - Path=/api/auth/**
          filters:
            - StripPrefix=0
        - id: oauth-router
          uri: lb://account-service
          predicates:
            - Path=/oauth/**
          filters:
            - StripPrefix=0
        - id: user-router
          uri: lb://user-service
          predicates:
            - Path=/api/user/**
          filters:
            - StripPrefix=0
        ###############################################################################
        - id: content-router
          uri: lb://content-service
          predicates:
            - Path=/api/content/**
          filters:
            - StripPrefix=0
        - id: timeline-router
          uri: lb://content-service
          predicates:
            - Path=/api/timeline/**
          filters:
            - StripPrefix=0
        - id: search-router
          uri: lb://content-service
          predicates:
            - Path=/api/search/**
          filters:
            - StripPrefix=0
        - id: comment-router
          uri: lb://content-service
          predicates:
            - Path=/api/comment/**
          filters:
            - StripPrefix=0
        - id: mall-router
          uri: lb://content-service
          predicates:
            - Path=/api/mall/**
          filters:
            - StripPrefix=0
        - id: geo-router
          uri: lb://content-service
          predicates:
            - Path=/api/geo/**
          filters:
            - StripPrefix=0
        - id: im-router
          uri: lb://content-service
          predicates:
            - Path=/api/chat/**
          filters:
            - StripPrefix=0
        ###############################################################################
        - id: data-router
          uri: lb://data-service
          #uri: http://192.168.0.39:6005
          predicates:
            - Path=/api/data/**
          filters:
            - StripPrefix=0
        ###############################################################################
        - id: file-router
          uri: lb://file-service
          predicates:
            - Path=/api/file/**
          filters:
            - StripPrefix=0
        ###############################################################################
        - id: message-websocket
          uri: lb:ws://message-service
          predicates:
            - Path=/ws/**
        - id: message-router
          uri: lb://message-service
          predicates:
            - Path=/api/message/**
#    gateway:
#      globalcors:
#        cors-configurations:
#          '[/**]':
#            allowedOrigins: "*"
#            allowedMethods: "*"
#            allowedHeaders: "*"
eureka:
  instance:
    prefer-ip-address: true
  client:
    register-with-eureka: true
    fetch-registry: true