From cc7ec519bc5234bf03ebcac9e52fc015195046e9 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 8 Dec 2017 14:20:09 +0100 Subject: [PATCH] Revert: fix development default values --- config/settings.yml | 6 +++--- src/Settings.hs | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/settings.yml b/config/settings.yml index a3dfcafe3..4cf378423 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -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 diff --git a/src/Settings.hs b/src/Settings.hs index 8d83b5f71..e595cdc59 100644 --- a/src/Settings.hs +++ b/src/Settings.hs @@ -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 {..}