spring:
  cloud:
    nacos:
      discovery:
        server-addr: 192.168.1.57:8848
    gateway:
#      globalcors:
#        cors-configurations:
#          '[/**]':
#            allowedHeaders: "*"
#            allowedOrigins: "*"
##            allowCredentials: true
#            allowedMethods:
#              - GET
#              - POST
#              - DELETE
#              - PUT
#              - OPTION
#            maxAge: 1800
      routes:
        # management
        - id: management_route
          uri: lb://huimv-smart-management
          predicates:
            - Path=/api/management/**
          filters:
            - RewritePath=/api/management/(?<segment>/?.*), /management/$\{segment}
        # datacollection
        - id: datacollection_route
          uri: lb://huimv-smart-datacollection
          predicates:
            - Path=/api/datacollection/**
          filters:
            - RewritePath=/api/datacollection/(?<segment>/?.*), /datacollection/$\{segment}
        # renren-fast后台管理系统的路由(低优先级的放在下面)
        - id: admin_route
          uri: http://127.0.0.1:9500
          predicates:
            - Path=/api/**
          filters:
            - RewritePath=/api/(?<segment>/?.*), /renren-fast/$\{segment}

#        - id: apiservice_route
#          uri: http://127.0.0.1:9001
#        # apiservice后台接口路由
#          predicates:
#            - Path=/**

#      discovery:
#        locator:
#          enabled: true                 # 设置为true 请求路径前可以添加微服务名称  http://localhost:88/gateway-provider/goods/findOne/2 -> http://localhost:88/goods/findOne/2
#          lower-case-service-id: true   # 允许为小写



## 前端项目, /api
## http://localhost:88/api/captcha.jpg  -> http://renren-fast/api/captcha.jpg -> http:localhost:8080/renren-fast/captcha.jpg
  application:
    name: huimv-smart-gateway


server:
  port: 88


#huimv:
#  public-key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAIvJs0JQAJJZ9VYKyo69ByDYzDpCTjyu/bUcw+7SI1PqZtliUYmjUmaQdzKigCjpQH2Sq3x+VSmfnprZhP6COYkCAwEAAQ==
#  # APP模块，是通过jwt认证的，如果要使用APP模块，则需要修改【加密秘钥】
#  jwt:
#    # 加密秘钥
#    secret: f4e2e52034348f86b67cde581c0f9eb5[www.huimv.com]
#    # token有效时长，7天，单位秒
#    expire: 604800
#    header: token