WAI middleware that serves requests to static files.


Version on this page:0.8.2@rev:1
LTS Haskell 22.25:0.9.2@rev:5
Stackage Nightly 2024-06-12:0.9.2@rev:5
Latest on Hackage:0.9.2@rev:5

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-0.8.2@sha256:b16665768044b63cb123d22df30b2d096e145ade2a8c7717da2a6b996540f158,2387

Module documentation for 0.8.2

wai-middleware-static Build Status

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


0.8.2 [2018.04.07]

  • Remove unused test suite.


  • Add Semigroup Policy instance
  • Replace dependencies on base16-bytestring and cryptohash with the more modern memory and cryptonite packages, respectively [myfreeweb]


  • The mime-types library is now used to lookup MIME types from extensions. As a result, some extensions now map to different MIME types. They are:

    Extension wai-middleware-static mime-types
    class application/octet-stream application/java-vm
    dtd text/xml application/xml-dtd
    jar application/x-java-archive application/java-archive
    js text/javascript application/javascript
    ogg application/ogg audio/ogg
    ttf application/x-font-truetype application/x-font-ttf
  • Exposed getMimeType function [Shimuuar]

  • 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