莫大人

1.3.2、通过Cookie匹配

server:
  port: 8080

spring: 
  application:
    name: gateway
  cloud:
    gateway:
      routes:
        - id: guo-system4
          uri: https://www.baidu.com
          predicates:
            - Path=/gateway
            - Cookie=sessionId, test #通过cookie匹配,cookie中sessionId=test时从这里路由
          filters:
            - StripPrefix=1

 

posted on 2021-06-21 10:35  莫大人  阅读(59)  评论(0编辑  收藏  举报

导航