ruoyi-gateway-dev.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. # 是否开启验证码
  52. enabled: true
  53. # 验证码类型 math 数组计算 char 字符验证
  54. type: MATH
  55. # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  56. category: CIRCLE
  57. # 数字验证码位数
  58. numberLength: 1
  59. # 字符验证码长度
  60. charLength: 4
  61. # 防止XSS攻击
  62. xss:
  63. enabled: true
  64. excludeUrls:
  65. - /system/notice
  66. # 不校验白名单
  67. ignore:
  68. whites:
  69. - /auth/logout
  70. - /auth/login
  71. - /auth/register
  72. - /*/v2/api-docs
  73. - /csrf