From de493b6ec392ba2c3552a13c7c6e965c1043c7a2 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sun, 19 Jun 2016 01:06:26 +0800 Subject: Do not serve /index.html (amended) --- src/Application.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Application.hs b/src/Application.hs index d0f9704..899708e 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -41,13 +41,10 @@ app ps f = do myProcess :: Pools -> Middleware -> FilePath -> ScottyM () myProcess ps logger dataDir = do - let - index_html = dataDir ++ "/" ++ "index.html" - middleware logger middleware $ staticPolicy (hasPrefix "static" >-> addBase dataDir) - get "/" $ file index_html + get "/" $ file (dataDir ++ "/" ++ "index.html") get "/serverlist.json" $ json (sort $ HM.keys ps) get "/server/:server/processlist.json" $ apiGetProcessList ps -- cgit v1.2.3