Throttle requests with limit_req rate based on header from response to auth subrequest

jarstewa nginx-forum at forum.nginx.org
Thu Aug 30 23:47:43 UTC 2018


Digging into this some more today, I've continued to find what seems to be
odd behavior.  If I remove all of the limit_req directives, then the mapped
variables based on the upstream are always present: 

{

    "upstream_http_tier": "",
    "tier": "02x",
    "http_tier": "",
    "key_two": "",
    "key_three": "",
    "key_two_from_upstream": "match",
    "key_three_from_upstream": "nonempty",
}

Whereas if I add the limit_req directives that reference "key_*" back in,
then those keys are no longer populated correctly:

{

    "upstream_http_tier": "",
    "tier": "02x",
    "http_tier": "",
    "key_two": "",
    "key_three": "",
    "key_two_from_upstream": "",
    "key_three_from_upstream": "",
}

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,281034,281056#msg-281056



More information about the nginx mailing list