alibaba / Sentinel

A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)
https://sentinelguard.io/
Apache License 2.0
22.38k stars 8.02k forks source link

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

Open asunlzy opened 3 years ago

asunlzy commented 3 years ago

我想在springcloud的gateway中获取header头里的token,token解密后有userId和deviceId,并且对deviceId=1的请求限流,请问该怎么做?请提供点建议或参考代码,谢谢。

asunlzy commented 3 years ago

token是密文,解密后有userId和deviceId。