WAI middleware that serves requests to static files.


Version on this page:
LTS Haskell 21.13:0.9.2@rev:3
Stackage Nightly 2023-09-22:0.9.2@rev:3
Latest on Hackage:0.9.2@rev:3

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-,1982

Module documentation for

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



  • Fixed Windows build (by replacing unix dependency with equivalent directory function)

  • Implement caching [agrafix]
  • Include mp4 and ogv mime_types [DrBoolean]
  • Dependency updates for ghc 7.10 [DougBurke]

  • 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