From 8de6f0a6989bdf14978560ae3b0cbb518472b215 Mon Sep 17 00:00:00 2001 From: Andrew Krasichkov Date: Tue, 2 May 2017 12:04:06 +0300 Subject: [PATCH] Added auth_request_set directive (#21) --- gixy/directives/directive.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gixy/directives/directive.py b/gixy/directives/directive.py index d9283bc..0443ba4 100644 --- a/gixy/directives/directive.py +++ b/gixy/directives/directive.py @@ -70,6 +70,20 @@ class SetDirective(Directive): return [Variable(name=self.variable, value=self.value, provider=self)] +class AuthRequestSetDirective(Directive): + nginx_name = 'auth_request_set' + provide_variables = True + + def __init__(self, name, args): + super(AuthRequestSetDirective, self).__init__(name, args) + self.variable = args[0].strip('$') + self.value = args[1] + + @property + def variables(self): + return [Variable(name=self.variable, value=self.value, provider=self)] + + class SetByLuaDirective(Directive): nginx_name = 'set_by_lua' provide_variables = True