only add :port to appRoot if not 80
This commit is contained in:
parent
5b91794903
commit
3d73acd902
@ -91,10 +91,14 @@ loadConfig env = do
|
|||||||
return $ AppConfig {
|
return $ AppConfig {
|
||||||
appEnv = env
|
appEnv = env
|
||||||
, appPort = read portS
|
, appPort = read portS
|
||||||
, appRoot = pack (hostS ++ ":" ++ portS)
|
, appRoot = maybeAddPort hostS portS
|
||||||
, connectionPoolSize = read connectionPoolSizeS
|
, 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
|
-- Static setting below. Changing these requires a recompile
|
||||||
|
|
||||||
-- | The location of static files on your system. This is a file system
|
-- | The location of static files on your system. This is a file system
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user