Revert: fix development default values

This commit is contained in:
Gregor Kleen 2017-12-08 14:20:09 +01:00
parent 9fca36b07f
commit cc7ec519bc
2 changed files with 9 additions and 9 deletions

View File

@ -13,12 +13,12 @@ approot: "_env:APPROOT:http://localhost:3000"
# Optional values with the following production defaults.
# In development, they default to the inverse.
#
detailed-logging: "_env:DETAILED_LOGGING:invalid"
should-log-all: "_env:LOG_ALL:invalid"
detailed-logging: "_env:DETAILED_LOGGING:false"
should-log-all: "_env:LOG_ALL:false"
# reload-templates: false
# mutable-static: false
# skip-combining: false
auth-dummy-login: "_env:DUMMY_LOGIN:invalid"
auth-dummy-login: "_env:DUMMY_LOGIN:false"
# NB: If you need a numeric value (e.g. 123) to parse as a String, wrap it in single quotes (e.g. "_env:PGPASS:'123'")
# See https://github.com/yesodweb/yesod/wiki/Configuration#parsing-numeric-values-as-strings

View File

@ -88,17 +88,17 @@ instance FromJSON AppSettings where
( appLDAPURI, appLDAPDN, appLDAPPw, appLDAPBaseName )
<- (=<< o .: "ldap") . withObject "LDAP" $ \obj -> (,,,) <$> obj .: "uri" <*> obj .: "dn" <*> obj .: "password" <*> obj .:? "basename"
appDetailedRequestLogging <- (o .:? "detailed-logging" <|> pure Nothing) .!= defaultDev
appShouldLogAll <- (o .:? "should-log-all" <|> pure Nothing) .!= defaultDev
appReloadTemplates <- (o .:? "reload-templates" <|> pure Nothing) .!= defaultDev
appMutableStatic <- (o .:? "mutable-static" <|> pure Nothing) .!= defaultDev
appSkipCombining <- (o .:? "skip-combining" <|> pure Nothing) .!= defaultDev
appDetailedRequestLogging <- o .:? "detailed-logging" .!= defaultDev
appShouldLogAll <- o .:? "should-log-all" .!= defaultDev
appReloadTemplates <- o .:? "reload-templates" .!= defaultDev
appMutableStatic <- o .:? "mutable-static" .!= defaultDev
appSkipCombining <- o .:? "skip-combining" .!= defaultDev
appCopyright <- o .: "copyright"
appAnalytics <- o .:? "analytics"
appCryptoIDKeyFile <- o .: "cryptoid-keyfile"
appAuthDummyLogin <- (o .:? "auth-dummy-login" <|> pure Nothing) .!= defaultDev
appAuthDummyLogin <- o .:? "auth-dummy-login" .!= defaultDev
return AppSettings {..}