diff --git a/Network/Wai/Middleware/Static.hs b/Network/Wai/Middleware/Static.hs
--- a/Network/Wai/Middleware/Static.hs
+++ b/Network/Wai/Middleware/Static.hs
@@ -1,6 +1,7 @@
 {-# LANGUAGE OverloadedStrings #-}
-module Network.Wai.Middleware.Static (static, staticRoot) where
+module Network.Wai.Middleware.Static (static, staticRoot, staticList) where
 
+import Control.Monad (mplus)
 import Control.Monad.Trans (liftIO)
 import Data.List (isInfixOf)
 import qualified Data.Map as M
@@ -32,8 +33,17 @@
               if exists
                 then return $ ResponseFile status200 [("Content-Type", getMimeType fp)] fStr Nothing
                 else app req
-  where fp = F.collapse $ F.fromText $ T.dropWhile (=='/') $ E.decodeUtf8 $ rawPathInfo req
+  where fp = F.collapse $ F.fromText $ T.intercalate "/" $ pathInfo req
         fStr = F.encodeString $ F.fromText base F.</> fp
+
+-- | Serve only the files given in an association list.
+-- Key is the URI, Value is the filesystem path.
+staticList :: [(T.Text, T.Text)] -> Middleware
+staticList fs app req =
+    maybe (app req)
+          (\fp -> return $ ResponseFile status200 [("Content-Type", getMimeType (F.fromText fp))] (T.unpack fp) Nothing)
+          ((lookup p fs) `mplus` (lookup (T.cons '/' p) fs)) -- try without and with leading slash
+    where p = (T.intercalate "/" $ pathInfo req)
 
 getMimeType :: F.FilePath -> B.ByteString
 getMimeType = go . map E.encodeUtf8 . F.extensions
diff --git a/wai-middleware-static.cabal b/wai-middleware-static.cabal
--- a/wai-middleware-static.cabal
+++ b/wai-middleware-static.cabal
@@ -1,5 +1,5 @@
 Name:                wai-middleware-static
-Version:             0.1.0
+Version:             0.1.1
 Synopsis:            WAI middleware that intercepts requests to static files.
 Homepage:            https://github.com/xich/scotty
 Bug-reports:         https://github.com/xich/scotty/issues
