| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- spring:
- cloud:
- gateway:
- globalcors:
- corsConfigurations:
- '[/**]':
- allowedOriginPatterns: "*"
- allowed-methods: "*"
- allowed-headers: "*"
- allow-credentials: true
- exposedHeaders: "Content-Disposition,Content-Type,Cache-Control"
- discovery:
- locator:
- lowerCaseServiceId: true
- enabled: true
- routes:
- # 认证中心
- - id: soc-auth
- uri: lb://soc-auth
- predicates:
- - Path=/auth/**
- filters:
- # 验证码处理
- - CacheRequestFilter
- - ValidateCodeFilter
- - StripPrefix=1
- # 代码生成
- - id: soc-gen
- uri: lb://soc-gen
- predicates:
- - Path=/code/*/*
- filters:
- - StripPrefix=1
- # 定时任务
- - id: soc-job
- uri: lb://soc-job
- predicates:
- - Path=/schedule/**
- filters:
- - StripPrefix=1
- # 系统模块
- - id: soc-system
- uri: lb://soc-system
- predicates:
- - Path=/system/**
- filters:
- - StripPrefix=1
- # 文件服务
- - id: soc-file
- uri: lb://soc-file
- predicates:
- - Path=/file/**
- filters:
- - StripPrefix=1
- # 核心服务
- - id: soc-core
- uri: lb://soc-core
- predicates:
- - Path=/core/**
- filters:
- - StripPrefix=1
- # 同步服务
- - id: soc-sync
- uri: lb://soc-sync
- predicates:
- - Path=/sync/**
- filters:
- - StripPrefix=1
- # 北向服务
- - id: soc-mediator
- uri: lb://soc-mediator
- predicates:
- - Path=/mediator/**
- filters:
- - StripPrefix=1
- - id: soc-iot
- uri: lb://soc-iot
- predicates:
- - Path=/iot/**
- filters:
- - StripPrefix=1
- # 短信服务
- - id: soc-sms
- uri: lb://soc-sms
- predicates:
- - Path=/sms/**
- filters:
- - StripPrefix=1
- # 部署中心服务
- - id: soc-deploy
- uri: lb://soc-deploy
- predicates:
- - Path=/api/deploy/**
- filters:
- - StripPrefix=2
- # websocket模块
- - id: soc-websocket
- uri: lb:ws://soc-system
- predicates:
- - Path=/websocket/**
- - id: soc-websocket
- uri: lb:ws://soc-mediator
- predicates:
- - Path=/ws/**
- - id: soc-websocket
- uri: lb:ws://soc-mediator
- predicates:
- - Path=/ws1/**
- - id: soc-host
- uri: lb:ws://soc-host
- predicates:
- - Path=/host/**
- - id: soc-host
- uri: lb:ws://soc-host
- predicates:
- - Path=/host1/**
- # 安全配置
- security:
- # 验证码
- captcha:
- enabled: false
- type: math
- # 防止XSS攻击
- xss:
- enabled: true
- excludeUrls:
- - /system/notice
- - /system/config
- # 不校验白名单
- ignore:
- whites:
- - /auth/logout
- - /auth/logoutApp
- - /auth/tokenlogin
- - /auth/login
- - /auth/loginApp
- - /auth/register
- - /*/v2/api-docs
- - /csrf
- - /mediator/**
- - /system/version/checkUpdate
- - /system/version/download/*
- - /file/file/getFile/*
- - /api/deploy/register
- - /api/deploy/accesstoken
- - /api/deploy/package/download/**
- - /api/deploy/agent/download/**
- - /api/deploy/frontend/synchronDate
- - /api/deploy/heartbeat
- - /api/deploy/list
- - /api/deploy/report
- - /api/deploy/task
- - /api/deploy/taskReport
- - /ws/**
- - /ws1/**
- - /host/**
- - /host1/**
|