Skip to content

Commit

Permalink
Added auth_request_set directive (yandex#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
buglloc authored May 2, 2017
1 parent 1a1a725 commit 8de6f0a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gixy/directives/directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ def variables(self):
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
Expand Down

0 comments on commit 8de6f0a

Please sign in to comment.