1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00
2019-05-28 11:24:29 +08:00

43 lines
1.0 KiB
YAML

server:
port: 18085
spring:
application:
name: sentinel-spring-cloud-gateway
cloud:
gateway:
enabled: true
discovery:
locator:
lower-case-service-id: true
routes:
# Add your routes here.
- id: aliyun_route
uri: https://www.aliyun.com/
predicates:
- Path=/product/**
- id: httpbin_route
uri: https://httpbin.org
predicates:
- Path=/httpbin/**
filters:
- RewritePath=/httpbin/(?<segment>.*), /$\{segment}
sentinel:
datasource.ds2.file:
file: "classpath: gateway.json"
ruleType: gw-flow
datasource.ds1.file:
file: "classpath: api.json"
ruleType: gw-api-group
transport:
dashboard: localhost:8080
filter:
enabled: true
scg.fallback:
mode: redirect
redirect: http://www.taobao.com
# response-status: 444
# response-body: 1234
# content-type: text/plain
management.endpoints.web.exposure.include: "*"