199 lines
5.3 KiB
YAML
199 lines
5.3 KiB
YAML
spring:
|
|
cloud:
|
|
gateway:
|
|
discovery:
|
|
locator:
|
|
lowerCaseServiceId: true
|
|
enabled: true
|
|
routes:
|
|
- id: auth
|
|
uri: lb://uaa-server
|
|
predicates:
|
|
- Path=/api-uaa/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- PreserveHostHeader
|
|
- id: auth-login-page
|
|
uri: lb://uaa-server
|
|
predicates:
|
|
- Path=/login.html
|
|
filters:
|
|
- PreserveHostHeader
|
|
- id: auth-login-process
|
|
uri: lb://uaa-server
|
|
predicates:
|
|
- Path=/user/login
|
|
filters:
|
|
- PreserveHostHeader
|
|
- id: auth-login-token
|
|
uri: lb://uaa-server
|
|
predicates:
|
|
- Path=/oauth/token
|
|
filters:
|
|
- PreserveHostHeader
|
|
- id: auth-login-authorize
|
|
uri: lb://uaa-server
|
|
predicates:
|
|
- Path=/oauth/authorize
|
|
filters:
|
|
- PreserveHostHeader
|
|
- id: auth-check-process
|
|
uri: lb://uaa-server
|
|
predicates:
|
|
- Path=/oauth/check_token
|
|
filters:
|
|
- PreserveHostHeader
|
|
- id: user
|
|
uri: lb://user-center
|
|
predicates:
|
|
- Path=/api-user/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- id: file
|
|
uri: lb://file-center
|
|
predicates:
|
|
- Path=/api-file/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- id: log
|
|
uri: lb://log-center
|
|
predicates:
|
|
- Path=/api-log/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- id: generator
|
|
uri: lb://code-generator
|
|
predicates:
|
|
- Path=/api-generator/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- id: search
|
|
uri: lb://search-center
|
|
predicates:
|
|
- Path=/api-search/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- id: device
|
|
uri: lb://device-center
|
|
predicates:
|
|
- Path=/api-device/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- id: order
|
|
uri: lb://order-center
|
|
predicates:
|
|
- Path=/api-order/**
|
|
filters:
|
|
- StripPrefix=1
|
|
- id: coupon
|
|
uri: lb://coupon-center
|
|
predicates:
|
|
- Path=/api-coupon/**
|
|
filters:
|
|
- StripPrefix=1
|
|
# sentinel:
|
|
# datasource.ds1.nacos:
|
|
# server-addr: ${spring.cloud.nacos.server-addr}
|
|
# data-id: ${spring.application.name}-sentinel-gw-flow
|
|
# group-id: DEFAULT_GROUP
|
|
# ruleType: gw-flow
|
|
# filter:
|
|
# enabled: true
|
|
|
|
knife4j:
|
|
gateway:
|
|
enabled: true
|
|
strategy: manual
|
|
routes:
|
|
- name: 用户服务
|
|
service-name: user-center
|
|
url: /api-user/v3/api-docs/default
|
|
context-path: /api-user
|
|
- name: 授权服务
|
|
service-name: uaa-server
|
|
url: /api-uaa/v3/api-docs/default
|
|
context-path: /api-uaa
|
|
- name: 搜索服务
|
|
service-name: search-center
|
|
url: /api-search/v3/api-docs/default
|
|
context-path: /api-search
|
|
- name: 文件服务
|
|
service-name: file-center
|
|
url: /api-file/v3/api-docs/default
|
|
context-path: /api-file
|
|
- name: 设备服务
|
|
service-name: device-center
|
|
url: /api-device/v3/api-docs/default
|
|
context-path: /api-device
|
|
- name: 订单服务
|
|
service-name: order-center
|
|
url: /api-order/v3/api-docs/default
|
|
context-path: /api-order
|
|
- name: 设备运维服务
|
|
service-name: device-ops-center
|
|
url: /api-device-ops/v3/api-docs/default
|
|
context-path: /api-device-ops
|
|
- name: 优惠券服务
|
|
service-name: coupon-center
|
|
url: /api-coupon/v3/api-docs/default
|
|
context-path: /api-coupon
|
|
|
|
zlt:
|
|
security:
|
|
ignore:
|
|
# 忽略认证的地址
|
|
httpUrls: >
|
|
/api-uaa/oauth/**,
|
|
/api-uaa/validata/**,
|
|
/api-uaa/css/**,
|
|
/api-uaa/images/**,
|
|
/api-uaa/js/**,
|
|
/login.html,
|
|
/user/login, /oauth/authorize,
|
|
/api-uaa/tokens/key,
|
|
/*/v3/api-docs/**,
|
|
/api-order/files/path,
|
|
/api-order/update,
|
|
/api-order/queue/first,
|
|
/api-order/wechat/**,
|
|
/api-order/home/carousel/app,
|
|
/api-order/device/status,
|
|
/api-order/token/callback,
|
|
/api-device/stream-urls,
|
|
/api-device/token/query,
|
|
/api-order/user/temp,
|
|
/api-file/file/expires,
|
|
/api-order/refund/auto,
|
|
/api-order/files/exists/**,
|
|
/api-coupon/coupon/ctrip/create
|
|
auth:
|
|
urlPermission:
|
|
#是否开启url级别权限
|
|
enable: false
|
|
#配置只进行登录认证,不进行url权限认证的api
|
|
ignoreUrls: >
|
|
/api-user/menus/current,
|
|
/api-user/users/current,
|
|
/api-log/requestStat
|
|
#白名单
|
|
includeClientIds:
|
|
- webApp
|
|
renew:
|
|
#是否开启token自动续签(目前只有redis实现)
|
|
enable: true
|
|
#白名单
|
|
includeClientIds:
|
|
- webApp
|
|
gateway:
|
|
#网关动态路由
|
|
dynamicRoute:
|
|
enabled: true
|
|
|
|
hystrix:
|
|
command:
|
|
default:
|
|
execution:
|
|
isolation:
|
|
thread:
|
|
timeoutInMilliseconds: 1000
|