Stacking phase directives in multiple contexts

23 views
Skip to first unread message

Aleš Bregar

unread,
Apr 11, 2018, 9:27:12 PM4/11/18
to openresty-en

I have a question regarding stacking phase directives in multiple contexts. I have tried to put access_by_lua_block within http context and then another block access_by_lua_file within location context expecting both blocks will execute.
I am observing that only location context block gets executed. Is that an expected behavior?

Thanks in advance and kind regards


tokers

unread,
Apr 11, 2018, 9:49:35 PM4/11/18
to openresty-en
Hello!

> I have a question regarding stacking phase directives in multiple contexts. I have tried to put access_by_lua_block within http context and then another 
> block access_by_lua_file within location context expecting both blocks will execute. 
> I am observing that only location context block gets executed. Is that an expected behavior? 

Yes, that's an expected behavior, the access_by_lua* directive inside a location has the higher priority than the one inside http block.

Robert Paprocki

unread,
Apr 11, 2018, 9:57:24 PM4/11/18
to openre...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openresty-en...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aleš Bregar

unread,
Apr 12, 2018, 4:48:59 AM4/12/18
to openresty-en
Thanks for clarification and forum link (should have seek it myself, I apologize for not doing that)
Reply all
Reply to author
Forward
0 new messages