Fixed target parser.

master
vi 2014-08-11 05:42:03 +08:00
parent 8ec3419492
commit 85605fcbab
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ parseRuleSets = catMaybes <$$> toListOf $ html . allNamed (only "ruleset") . to
parseRuleSet :: Element -> Maybe RuleSet
parseRuleSet xml = xml ^. attr "name" <&> \ruleSetName -> do
let ruleSetTargets = xml ^.. allNamed (only "target") . attr "name" . _Just . to parseTarget
let ruleSetTargets = xml ^.. allNamed (only "target") . attr "host" . _Just . to parseTarget
ruleSetRules = xml ^.. allNamed (only "rule") . to parseRule & catMaybes
ruleSetExclusions = xml ^.. allNamed (only "exclusion") . attr "pattern" . _Just . to parseExclusion & catMaybes
ruleSetCookieRules = xml ^.. allNamed (only "securecookie") . to parseCookieRule & catMaybes