server:
  port: 88
spring:
  cloud:
    gateway:
      routes:
        - id: emall-admin
          uri: lb://emall-admin
          predicates:
            - Path=/api/**
          filters:
            - RewritePath=/api/(?<segment>.*), /emall-admin/$\{segment}
      # 解决跨域问题
      globalcors:
        cors-configurations:
          '[/**]':
            allowedOriginPatterns: "*"
            allowedMethods:
              - "*"
            allowedHeaders:
              - "*"
            allowCredentials: true
      default-filters:
        - DedupeResponseHeader=Vary Access-Control-Allow-Origin Access-Control-Allow-Credentials, RETAIN_FIRST;

标签: gateway

添加新评论