From 7e83686d31bd1ebf627b843eff6210a636e6f719 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 28 Feb 2021 09:24:37 -0800 Subject: trypandoc: add 2 second timeout. --- trypandoc/trypandoc.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'trypandoc') diff --git a/trypandoc/trypandoc.hs b/trypandoc/trypandoc.hs index 810752afa..385fcfe55 100644 --- a/trypandoc/trypandoc.hs +++ b/trypandoc/trypandoc.hs @@ -12,6 +12,7 @@ Provides a webservice which allows to try pandoc in the browser. -} module Main where import Network.Wai.Handler.CGI +import Network.Wai.Middleware.Timeout (timeout) import Network.Wai import Control.Applicative ((<$>)) import Data.Maybe (fromMaybe) @@ -29,7 +30,7 @@ import qualified Data.Text as T import Data.Text (Text) main :: IO () -main = run app +main = run $ timeout 2 app app :: Application app req respond = do -- cgit v1.2.3