Skip to main content
1 vote
1 answer
84 views

I'm very new to using the local sock = ngx.socket.tcp() call that is provided by the nginx lua packages provided on Ubuntu Noble (i.e. the libnginx-mod-http-lua package). I've been able to get some ...
Rodney Lott's user avatar
0 votes
0 answers
68 views

I need to always return in case of errors. 400, 401, 403, 404, 500... my html pages with errors if the response is from the destination server is text/html, otherwise I can return the server's ...
JkLSweetMint's user avatar
1 vote
1 answer
238 views

I've been banging my head on this problem for a few days now, and have gotten a bit stuck, so I thought I'd ask here. Would really appreciate any help. Context: The issue that I'm currently facing ...
Arman Jasuja's user avatar
0 votes
1 answer
1k views

I'm using lua nginx module in my nginx conf file. I'm trying to set a value variable during runtime depending on some injected parameters. However, I can not return a boolean from the block without ...
Sankalp's user avatar
  • 1,288
2 votes
0 answers
596 views

I am using Lua Nginx module in my nginx server. I have a Lua script which is execute by init_worker_by_lua_file in nginx.conf so the script will execute when nginx start and restart. What the Lua ...
thirdwave's user avatar
0 votes
0 answers
210 views

I am reading the ngnix client certificate and storing it in a local variable. local client_cert = openssl_x509.new(ngx.var.ssl_client_raw_cert) local subject = client_cert:getSubject() I need to get ...
subrat padhi's user avatar
1 vote
1 answer
3k views

I am trying to read the request body in a custom plugin by following this url local data = kong.request.get_body() if data then kong.log(data) end I am getting the following error 2019/03/...
navin's user avatar
  • 185
1 vote
1 answer
3k views

I am new to openresty/nginx and am trying to replace the body the comes from an earlier call to proxy_pass with code like this: body_filter_by_lua_block { ngx.arg[1] = '{"count"' .. ":2}' ngx.arg[...
Jake Pearson's user avatar
  • 27.9k
4 votes
2 answers
8k views

I'm new to nginx lua, and got a setup from previous developer. Trying to go through the docs to understand the scope but I'm pretty unsure. It's like this right now init_by_lua_block { my_module ...
Luan Nguyen's user avatar