only add :port to appRoot if not 80

This commit is contained in:
patrick brisbin 2011-08-31 22:56:04 -04:00
parent 5b91794903
commit 3d73acd902

View File

@ -91,10 +91,14 @@ loadConfig env = do
return $ AppConfig {
appEnv = env
, appPort = read portS
, appRoot = pack (hostS ++ ":" ++ portS)
, appRoot = maybeAddPort hostS portS
, connectionPoolSize = read connectionPoolSizeS
}
where
maybeAddPort :: String -> String -> Text
maybeAddPort h p = pack $ if p == "80" then h else h ++ ":" ++ p
-- Static setting below. Changing these requires a recompile
-- | The location of static files on your system. This is a file system