lua-nginx-module icon indicating copy to clipboard operation
lua-nginx-module copied to clipboard

Edit fastcgi_param

Open avkarenow opened this issue 7 years ago • 2 comments

Hello,

maybe it is possible now somehow but I didn't see how to do it... I need to add, del and edit fastcgi_param.

LUA module is powerful so maybe is an option to do it or add that possibility (uwsgi_param and scgi_param will be also nice to have).

Any ideas? :)

avkarenow avatar Mar 19 '18 20:03 avkarenow

Nobody? ;)

avkarenow avatar Aug 12 '18 20:08 avkarenow

@avkarenow I'm afraid lua module cannot operate directives outside of nginx_core, including fastcgi_module. Your only option is to use nginx variables and set them via set_by_lua_... or request hooks and use them in nginx blocks directly.

location ~ .*/.php$ {
     
     set_by_lua_block $hello {
        -- do your non blocking logic here
        return 'World';
     }
    ...
    fcgi_param HELLO $hello;
 }

akuzia avatar Jul 03 '23 07:07 akuzia