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