diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2016-06-19 01:06:26 +0800 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2016-06-19 01:06:26 +0800 |
commit | de493b6ec392ba2c3552a13c7c6e965c1043c7a2 (patch) | |
tree | 65b06babecc46277d58603e67c29e12ccc5509be /src | |
parent | 2715822e6ae3ab5ba0cbd3e6a303007f32ffd18b (diff) | |
download | mywatch-de493b6ec392ba2c3552a13c7c6e965c1043c7a2.tar.gz |
Do not serve /index.html (amended)
Diffstat (limited to 'src')
-rw-r--r-- | src/Application.hs | 5 |
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 |