Forum: NGINX Using regex captures in handler

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Marcus C. (Guest)
on 2009-03-10 19:39
(Received via mailing list)

I'm writing an Nginx module where I'd like to use the regex and variable
captures as part of my own directives, e.g.

set    $my_var   my_val;

location   ~ ^/test/(.*)$ {
    my_directive_setting   $my_var.$1;

I know this is easily possible just by using the 'set' directive, but
there are performance reasons I don't want to do that (sometimes my
setting can determine things at launch time, which using the 'set'
directive would need to be done at runtime).

I've been reading through the source code, but haven't yet found which
functions I need to use to setup (at launch time) and write the
directive's value (at runtime).

Can anyone tell me what functions I need to use?


This topic is locked and can not be replied to.