Nenhuma descrição

ruoyi-gateway.yml 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # 安全配置
  2. security:
  3. # 防止XSS攻击
  4. xss:
  5. enabled: true
  6. excludeUrls:
  7. - /system/notice
  8. - /workflow/model/save
  9. - /workflow/model/editModelXml
  10. # 不校验白名单
  11. ignore:
  12. whites:
  13. - /auth/code
  14. - /auth/logout
  15. - /auth/login
  16. - /auth/binding/*
  17. - /auth/social/callback
  18. - /auth/register
  19. - /auth/tenant/list
  20. - /resource/sms/code
  21. - /*/v3/api-docs
  22. - /*/error
  23. - /csrf
  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-backstage
  58. uri: lb://ruoyi-backstage
  59. predicates:
  60. - Path=/backstage/**,/monitor/**
  61. filters:
  62. - StripPrefix=1
  63. # 客房管理模块
  64. - id: ruoyi-hotel
  65. uri: lb://ruoyi-hotel
  66. predicates:
  67. - Path=/hotel/**,/monitor/**
  68. filters:
  69. - StripPrefix=1
  70. # 资源服务
  71. - id: ruoyi-resource
  72. uri: lb://ruoyi-resource
  73. predicates:
  74. - Path=/resource/**
  75. filters:
  76. - StripPrefix=1
  77. # workflow服务
  78. - id: ruoyi-workflow
  79. uri: lb://ruoyi-workflow
  80. predicates:
  81. - Path=/workflow/**
  82. # 演示服务
  83. - id: ruoyi-demo
  84. uri: lb://ruoyi-demo
  85. predicates:
  86. - Path=/demo/**
  87. filters:
  88. - StripPrefix=1
  89. # MQ演示服务
  90. - id: ruoyi-test-mq
  91. uri: lb://ruoyi-test-mq
  92. predicates:
  93. - Path=/test-mq/**
  94. filters:
  95. - StripPrefix=1
  96. # sentinel 配置
  97. sentinel:
  98. filter:
  99. enabled: false
  100. # nacos配置持久化
  101. datasource:
  102. ds1:
  103. nacos:
  104. server-addr: ${spring.cloud.nacos.server-addr}
  105. dataId: sentinel-${spring.application.name}.json
  106. groupId: ${spring.cloud.nacos.config.group}
  107. username: ${spring.cloud.nacos.username}
  108. password: ${spring.cloud.nacos.password}
  109. namespace: ${spring.profiles.active}
  110. data-type: json
  111. rule-type: gw-flow