Do not require jwt secret, but die on auth without it

This commit is contained in:
Joe Nelson
2016-09-24 21:28:08 -07:00
parent 449480bf01
commit 62ed9e2c4d
9 changed files with 69 additions and 23 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ main = do
loadSecretFile :: AppConfig -> IO AppConfig
loadSecretFile conf = do
let s = configJwtSecret conf
real <- case stripPrefix "@" s of
real <- case join (stripPrefix "@" <$> s) of
Nothing -> return s -- the string is the secret, not a filename
Just filename -> readFile (toS filename)
Just filename -> sequence . Just $ readFile (toS filename)
return conf { configJwtSecret = real }