How to customize parseStrategy of GatewayFlowRule | API 网关自定义限流参数策略怎么做
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
hi 我目前在使用1.8.5最新版本的sentinel,我将sentinel和zuul网关结合,在使用限流功能时尝试设置限流策略进行限流,也就是setParseStrategy,我看到sentinel目前支持PARAM_PARSE_STRATEGY_CLIENT_IP,PARAM_PARSE_STRATEGY_HOST,PARAM_PARSE_STRATEGY_HEADER,PARAM_PARSE_STRATEGY_URL_PARAM,PARAM_PARSE_STRATEGY_COOKIE这几种策略,我想自己拓展一种从request.session中获取限流参数的策略,我需要怎么做?
Contributor guide
Research direction
Start by locating GatewayFlowRule#setParseStrategy and the existing PARAM_PARSE_STRATEGY_* options described in the issue. Trace how the gateway obtains the rate-limiting parameter, then determine whether request.session-based parsing can be supported and how it should be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100