diff --git a/raven-haskell-scotty.cabal b/raven-haskell-scotty.cabal
--- a/raven-haskell-scotty.cabal
+++ b/raven-haskell-scotty.cabal
@@ -1,5 +1,5 @@
 name:                raven-haskell-scotty
-version:             0.1.0.1
+version:             0.1.0.2
 synopsis:            Sentry http interface for Scotty web server.
 description:         Utilities to log errors in Scotty actions using raven-haskell.
 homepage:            http://bitbucket.org/dpwiz/raven-haskell
@@ -22,3 +22,4 @@
     scotty, wai, case-insensitive,
     bytestring, text,
     mtl
+  extensions: CPP
diff --git a/src/System/Log/Raven/Scotty.hs b/src/System/Log/Raven/Scotty.hs
--- a/src/System/Log/Raven/Scotty.hs
+++ b/src/System/Log/Raven/Scotty.hs
@@ -83,7 +83,12 @@
              | (h, v) <- requestHeaders r
              ]
 
+#if MIN_VERSION_scotty(0,5,0)
+    host <- maybe (TL.pack "") id `fmap` reqHeader (TL.pack "Host")
+#else
     host <- reqHeader (TL.pack "Host")
+#endif
+
     let url = "http://" ++ TL.unpack host ++ BS.unpack (rawPathInfo r)
 
     ps <- params
