ruoyi-gateway-dev.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. spring:
  2. cloud:
  3. gateway:
  4. discovery:
  5. locator:
  6. lowerCaseServiceId: true
  7. enabled: true
  8. routes:
  9. # 认证中心
  10. - id: ruoyi-auth
  11. uri: lb://ruoyi-auth
  12. predicates:
  13. - Path=/auth/**
  14. filters:
  15. # 验证码处理
  16. - CacheRequestFilter
  17. - ValidateCodeFilter
  18. - StripPrefix=1
  19. # 代码生成
  20. - id: ruoyi-gen
  21. uri: lb://ruoyi-gen
  22. predicates:
  23. - Path=/code/**
  24. filters:
  25. - StripPrefix=1
  26. # 定时任务
  27. - id: ruoyi-job
  28. uri: lb://ruoyi-job
  29. predicates:
  30. - Path=/schedule/**
  31. filters:
  32. - StripPrefix=1
  33. # 系统模块
  34. - id: ruoyi-system
  35. uri: lb://ruoyi-system
  36. predicates:
  37. - Path=/system/**
  38. filters:
  39. - StripPrefix=1
  40. # 文件服务
  41. - id: ruoyi-file
  42. uri: lb://ruoyi-file
  43. predicates:
  44. - Path=/file/**
  45. filters:
  46. - StripPrefix=1
  47. # 安全配置
  48. security:
  49. # 验证码
  50. captcha:
  51. enabled: true
  52. type: math
  53. # 防止XSS攻击
  54. xss:
  55. enabled: true
  56. excludeUrls:
  57. - /system/notice
  58. # 不校验白名单
  59. ignore:
  60. whites:
  61. - /auth/logout
  62. - /auth/login
  63. - /auth/register
  64. - /*/v2/api-docs
  65. - /csrf