- rewrite :: (ByteString -> IO ByteString) -> Middleware
- autoHtmlRewrite :: String -> ByteString -> IO ByteString
Documentation
rewrite :: (ByteString -> IO ByteString) -> MiddlewareSource
rewrite based on your own conversion rules Example usage: rewrite (autoHtmlRewrite static)
autoHtmlRewrite :: String -> ByteString -> IO ByteStringSource
example rewriter implements 2 rules for static html re-writes 1) for a directory foo, check for fooindex.html 2) for a non-directory bar, check for bar.html if the file exists, do the rewrite