From 3d73acd902558977cb1b9613e1fe0086e1a72f9a Mon Sep 17 00:00:00 2001 From: patrick brisbin Date: Wed, 31 Aug 2011 22:56:04 -0400 Subject: [PATCH] only add :port to appRoot if not 80 --- yesod/scaffold/Settings.hs.cg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yesod/scaffold/Settings.hs.cg b/yesod/scaffold/Settings.hs.cg index 60715302..97352bf6 100644 --- a/yesod/scaffold/Settings.hs.cg +++ b/yesod/scaffold/Settings.hs.cg @@ -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