Several common methods of data sharing in OpenResty
1. Variables in Nginx
Data can be shared between Nginx C modules, and data can also be shared between the C module and the lua-nginx-module provided by OpenResty (which embeds Lua functions into the Nginx HTTP server).
example:
location /foo {
set $my_var ''