mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 08:12:15 -04:00
Nginx map statement hotfix
This commit is contained in:
parent
6a7b4a8e14
commit
c4974e6d93
1 changed files with 2 additions and 1 deletions
|
|
@ -30,10 +30,11 @@ class RawNginxParser(object):
|
|||
assignment = (key + Optional(space + value, default=None) + semicolon)
|
||||
location_statement = Optional(space + modifier) + Optional(space + location)
|
||||
if_statement = Literal("if") + space + Regex(r"\(.+\)") + space
|
||||
map_statement = Literal("map") + space + Regex(r"\S+") + space + Regex(r"\$\S+") + space
|
||||
block = Forward()
|
||||
|
||||
block << Group(
|
||||
(Group(key + location_statement) ^ Group(if_statement)) +
|
||||
(Group(key + location_statement) ^ Group(if_statement) ^ Group(map_statement)) +
|
||||
left_bracket +
|
||||
Group(ZeroOrMore(Group(comment | assignment) | block)) +
|
||||
right_bracket)
|
||||
|
|
|
|||
Loading…
Reference in a new issue