springcloud的gateway中怎么根据header中token里的某个属性来限流?
Open
area/gateway-flow-control
kind/question
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
我想在springcloud的gateway中获取header头里的token,token解密后有userId和deviceId,并且对deviceId=1的请求限流,请问该怎么做?请提供点建议或参考代码,谢谢。
Contributor guide
Research direction
Start with the Spring Cloud Gateway integration and Sentinel's rate-limiting entry points. Determine how the header token is decoded to obtain deviceId, then define how requests with deviceId=1 should be limited. Done means a documented approach or reference implementation clearly enforces that limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100