Fix five minutes (thanks @tolysz)

This commit is contained in:
Michael Snoyman 2015-05-03 19:57:14 +03:00
parent 28cb3ff587
commit 491ace549e
4 changed files with 10 additions and 7 deletions

View File

@ -93,9 +93,12 @@ instance Default KeterConfig where
, kconfigSetuid = Nothing
, kconfigReverseProxy = Set.empty
, kconfigIpFromHeader = False
, kconfigConnectionTimeBound = 5000
, kconfigConnectionTimeBound = fiveMinutes
}
fiveMinutes :: Int
fiveMinutes = 5 * 60 * 1000
instance ParseYamlFile KeterConfig where
parseYamlFile basedir = withObject "KeterConfig" $ \o -> KeterConfig
<$> lookupBase basedir o "root"
@ -106,7 +109,7 @@ instance ParseYamlFile KeterConfig where
<*> o .:? "setuid"
<*> o .:? "reverse-proxy" .!= Set.empty
<*> o .:? "ip-from-header" .!= False
<*> o .:? "connection-time-bound" .!= 5000
<*> o .:? "connection-time-bound" .!= fiveMinutes
data TLSConfig = TLSConfig !Warp.Settings !WarpTLS.TLSSettings

View File

@ -139,7 +139,7 @@ instance Default KeterConfig where
, kconfigExternalHttpPort = 80
, kconfigExternalHttpsPort = 443
, kconfigEnvironment = Map.empty
, kconfigConnectionTimeBound = 5000
, kconfigConnectionTimeBound = V04.fiveMinutes
}
instance ParseYamlFile KeterConfig where
@ -159,7 +159,7 @@ instance ParseYamlFile KeterConfig where
<*> o .:? "external-http-port" .!= 80
<*> o .:? "external-https-port" .!= 443
<*> o .:? "env" .!= Map.empty
<*> o .:? "connection-time-bound" .!= 5000
<*> o .:? "connection-time-bound" .!= V04.fiveMinutes
-- | Whether we should force redirect to HTTPS routes.
type RequiresSecure = Bool

View File

@ -34,5 +34,5 @@ listeners:
# key: value
# Connection time bound in milliseconds, set to 0 to have no time bound,
# i.e. keep connections alive indefinitely. Default value is 5000.
# connection-time-bound: 5000
# i.e. keep connections alive indefinitely. Default value is 5 minutes.
# connection-time-bound: 300000

View File

@ -1,5 +1,5 @@
Name: keter
Version: 1.3.10
Version: 1.3.10.1
Synopsis: Web application deployment manager, focusing on Haskell web frameworks
Description: Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/keter>.
Homepage: http://www.yesodweb.com/