I need to have access to the api_key query parameter, which is provided by content_by_lua (unless I'm mistaken)On Mon, Jun 1, 2015 at 1:10 PM, Robert Paprocki <rpap...@fearnothingproductions.net> wrote:Why not just make the first step part of the access phase as well?On Mon, Jun 1, 2015 at 1:02 PM, Matthew Glinski <matthe...@gmail.com> wrote:Use Kong: http://getkong.org/On Mon, Jun 1, 2015 at 3:56 PM, kaspersky_us via openresty-en <openresty-en@googlegroups.com> wrote: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 key2) rate limit the API call3) execute some processing logicI 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. . kaspersky_us Thanks... Somehow missed it. Sorry for the noise.
Why not just make the first step part of the access phase as well?On Mon, Jun 1, 2015 at 1:02 PM, Matthew Glinski <matthe...@gmail.com> wrote:Use Kong: http://getkong.org/On Mon, Jun 1, 2015 at 3:56 PM, kaspersky_us via openresty-en <openresty-en@googlegroups.com> wrote: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 key2) rate limit the API call3) execute some processing logicI 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. . kaspersky_us Thanks... Somehow missed it. Sorry for the noise.
Use Kong: http://getkong.org/On Mon, Jun 1, 2015 at 3:56 PM, kaspersky_us via openresty-en <openresty-en@googlegroups.com> wrote: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 key2) rate limit the API call3) execute some processing logicI 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. .
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 key2) rate limit the API call3) execute some processing logicI 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. .