aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2016-06-19 01:06:26 +0800
committerIgor Pashev <pashev.igor@gmail.com>2016-06-19 01:06:26 +0800
commitde493b6ec392ba2c3552a13c7c6e965c1043c7a2 (patch)
tree65b06babecc46277d58603e67c29e12ccc5509be /src
parent2715822e6ae3ab5ba0cbd3e6a303007f32ffd18b (diff)
downloadmywatch-de493b6ec392ba2c3552a13c7c6e965c1043c7a2.tar.gz
Do not serve /index.html (amended)
Diffstat (limited to 'src')
-rw-r--r--src/Application.hs5
1 files changed, 1 insertions, 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