WAI middleware that serves requests to static files.


Version on this page:
LTS Haskell 19.8:0.9.2
Stackage Nightly 2022-05-25:0.9.2
Latest on Hackage:0.9.2

See all snapshots wai-middleware-static appears in

BSD-3-Clause licensed and maintained by Andrew Farmer
This version can be pinned in stack with:wai-middleware-static-,1626

Module documentation for

  • Network
    • Network.Wai
      • Network.Wai.Middleware
        • Network.Wai.Middleware.Static

WAI middleware that intercepts requests to static files and serves them if they exist.



  • Update links to new wai-middleware-static github/issue tracker.

  • Bump upper bound for text


  • Update to wai 3.0

  • Bump upper bound for mtl

  • Add isNotAbsolute policy and change static and staticPolicy to use noDots and isNotAbsolute policies by default. (Thanks to Nick Hibberd!)

  • Add unsafeStaticPolicy, which behaves as the old insecure staticPolicy behaved.

  • Add changelog