Is a dynamic rate limit based on request headers possible?

Do you mean quota instead of rate-limit?

I replied to a similar question previously. I have grabbed my response and shared it here

It might be as long as you can retrieve and modify the rate limit key in Redis rate-limit-<UNHASHED_ID_OR_HASH>

An alternative approach may be to disable quota and rate-limiting but use the key’s metadata field to manually manage your dynamic rate limit or quota. It would involve a lot of effort in you implementing everything. Please note this suggestion is only a theory and hasn’t been tested.