alibaba / alibaba/Sentinel

springcloud的gateway中怎么根据header中token里的某个属性来限流?

Open
#2,287 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.