You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, I have a custom plugin that doing authentication to our internal service outside TYK. We have an identifier of who created the request in X-PARTNER-ID header, at the moment our custom plugin looks like this:
// doing http call to our internal auth service here
// inject session
session := &user.SessionState{
MetaData: map[string]interface{}{
"partner-id": r.Header.Get("X-PARTNER-ID"),
},
}
ctx.SetSession(r, session, true)
from the code above, is it possible to add custom rate limit but it should be based on the partner-id field? I don't want it to be a global rate limit and should be based per partner-id
The text was updated successfully, but these errors were encountered:
irfansofyana
changed the title
How to createa rate limit on custom plugin based on field in the HTTP header?
How to create rate limit on custom plugin based on field in the HTTP header?
Mar 28, 2024
Hi everyone! I need help for my use case.
At the moment, I have a custom plugin that doing authentication to our internal service outside TYK. We have an identifier of who created the request in
X-PARTNER-ID
header, at the moment our custom plugin looks like this:from the code above, is it possible to add custom rate limit but it should be based on the partner-id field? I don't want it to be a global rate limit and should be based per partner-id
The text was updated successfully, but these errors were encountered: