Hello,
Apologies if this is basic or has been answered already (but I couldn't find an answer).
I'd like to execute the following logic:
1) validate an API key
2) rate limit the API call
3) execute some processing logic
I can make this work separately, but when I want to combine, I understand I cannot call content_by_lua more than once, yet the flow above requires this:
1) content_by_lua (to check the API key from query parameter against a valid list or issue ngx.exit(ngx.HTTP_FORBIDDEN) otherwise)
2) access_by_lua (to rate limit the API call, or issue a status code 429)
3) content_by_lua (to process the normal logic)
Thanks for your help.