From 62bb35961fb647985164e6397508c96942892d3f Mon Sep 17 00:00:00 2001 From: Fernando Tapia Rico Date: Tue, 5 Dec 2017 21:06:37 +0100 Subject: [PATCH] Add perl_set directive Defined in the ngx_http_perl_module --- gixy/directives/directive.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gixy/directives/directive.py b/gixy/directives/directive.py index c15dee0..04ee93b 100644 --- a/gixy/directives/directive.py +++ b/gixy/directives/directive.py @@ -84,6 +84,20 @@ class AuthRequestSetDirective(Directive): return [Variable(name=self.variable, value=self.value, provider=self)] +class PerlSetDirective(Directive): + nginx_name = 'perl_set' + provide_variables = True + + def __init__(self, name, args): + super(PerlSetDirective, self).__init__(name, args) + self.variable = args[0].strip('$') + self.value = args[1] + + @property + def variables(self): + return [Variable(name=self.variable, provider=self, have_script=False)] + + class SetByLuaDirective(Directive): nginx_name = 'set_by_lua' provide_variables = True