summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2019-02-16 10:56:07 +0300
committerdefanor <defanor@uberspace.net>2019-02-16 10:56:07 +0300
commitdd5d7650a7a45ad66b139f5fc7874264104e2095 (patch)
treebcd9623d229fea99c529bf34507e6a7639908002
parent3c00d9f42a26808c6c1763f93f78371b318c5b06 (diff)
downloadpgxhtml-dd5d7650a7a45ad66b139f5fc7874264104e2095.zip
pgxhtml-dd5d7650a7a45ad66b139f5fc7874264104e2095.tar.gz
pgxhtml-dd5d7650a7a45ad66b139f5fc7874264104e2095.tar.bz2
Use credentials whenever they are provided
Not necessarily with auth=on.
-rw-r--r--Main.hsc2
1 files changed, 1 insertions, 1 deletions
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