From dd5d7650a7a45ad66b139f5fc7874264104e2095 Mon Sep 17 00:00:00 2001 From: defanor Date: Sat, 16 Feb 2019 10:56:07 +0300 Subject: Use credentials whenever they are provided Not necessarily with auth=on. --- Main.hsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Main.hsc') diff --git a/Main.hsc b/Main.hsc index ea3d50c..3c247de 100644 --- a/Main.hsc +++ b/Main.hsc @@ -323,7 +323,7 @@ main = do to <- maybe 10 read <$> lookupEnv "TIMEOUT" maybe (respond 504 "") pure =<< timeout (to * 10 ^ (6 :: Int)) (case (lookup "auth" ps, baCredentials =<< BS.pack <$> ha) of - (Just "on", Just (l, p)) -> + (_, Just (l, p)) -> serve xsltDir (connectdb (connString [("user", l), ("password", p)])) ps (Just "on", Nothing) -> requireAuth -- cgit v1.2.3