Add perl_set directive

Defined in the ngx_http_perl_module
pull/87/head
Fernando Tapia Rico 2017-12-05 21:06:37 +01:00 committed by Andrew Krasichkov
parent f5a54ad161
commit 0e032605b5
1 changed files with 14 additions and 0 deletions

View File

@ -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