ruoyi-gateway.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # 安全配置
  2. security:
  3. # 防止XSS攻击
  4. xss:
  5. enabled: true
  6. excludeUrls:
  7. - /system/notice
  8. # 不校验白名单
  9. ignore:
  10. whites:
  11. - /auth/code
  12. - /auth/logout
  13. - /auth/login
  14. - /auth/binding/*
  15. - /auth/social/callback
  16. - /auth/register
  17. - /auth/tenant/list
  18. - /resource/sms/code
  19. - /*/v3/api-docs
  20. - /*/error
  21. - /csrf
  22. - /baseplat/evcs/**
  23. - /userplat/evcs/**
  24. spring:
  25. cloud:
  26. # 网关配置
  27. gateway:
  28. # 打印请求日志(自定义)
  29. requestLog: true
  30. discovery:
  31. locator:
  32. lowerCaseServiceId: true
  33. enabled: true
  34. routes:
  35. # 认证中心
  36. - id: ruoyi-auth
  37. uri: lb://ruoyi-auth
  38. predicates:
  39. - Path=/auth/**
  40. filters:
  41. - StripPrefix=1
  42. # 代码生成
  43. - id: ruoyi-gen
  44. uri: lb://ruoyi-gen
  45. predicates:
  46. - Path=/tool/**
  47. filters:
  48. - StripPrefix=1
  49. # 系统模块
  50. - id: ruoyi-system
  51. uri: lb://ruoyi-system
  52. predicates:
  53. - Path=/system/**,/monitor/**
  54. filters:
  55. - StripPrefix=1
  56. # 资源服务
  57. - id: ruoyi-resource
  58. uri: lb://ruoyi-resource
  59. predicates:
  60. - Path=/resource/**
  61. filters:
  62. - StripPrefix=1
  63. # 演示服务
  64. - id: ruoyi-demo
  65. uri: lb://ruoyi-demo
  66. predicates:
  67. - Path=/demo/**
  68. filters:
  69. - StripPrefix=1
  70. # MQ演示服务
  71. - id: ruoyi-stream-mq
  72. uri: lb://ruoyi-stream-mq
  73. predicates:
  74. - Path=/stream-mq/**
  75. filters:
  76. - StripPrefix=1
  77. # 充电-基础平台
  78. - id: tino-baseplat
  79. uri: lb://tino-baseplat
  80. predicates:
  81. - Path=/baseplat/**
  82. filters:
  83. - StripPrefix=1
  84. # 充电-用户平台
  85. - id: tino-userplat
  86. uri: lb://tino-userplat
  87. predicates:
  88. - Path=/userplat/**
  89. filters:
  90. - StripPrefix=1
  91. # 充电-客户端
  92. - id: tino-mp
  93. uri: lb://tino-mp
  94. predicates:
  95. - Path=/mp/**
  96. filters:
  97. - StripPrefix=1
  98. # sentinel 配置
  99. sentinel:
  100. filter:
  101. enabled: false
  102. # nacos配置持久化
  103. datasource:
  104. ds1:
  105. nacos:
  106. server-addr: ${spring.cloud.nacos.server-addr}
  107. dataId: sentinel-${spring.application.name}.json
  108. groupId: ${spring.cloud.nacos.config.group}
  109. namespace: ${spring.profiles.active}
  110. data-type: json
  111. rule-type: gw-flow