Support for http-reverse-proxy 0.6.0

This commit is contained in:
Michael Snoyman 2018-04-26 11:20:04 +03:00
parent 06e0ffb48b
commit e87c9b5bf0
No known key found for this signature in database
GPG Key ID: A048E8C057E86876
3 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
## 1.6.0.1
* Support for http-reverse-proxy 0.6
## 1.6.0
* Upgrade to conduit 1.3.0

View File

@ -18,7 +18,6 @@ import Control.Monad (forever, unless, void,
import Data.ByteString (ByteString, isInfixOf)
import qualified Data.ByteString.Lazy as LB
import Conduit
import Data.Default.Class (def)
import Data.FileEmbed (embedFile)
import qualified Data.Map as Map
import Data.Maybe (isJust)
@ -38,7 +37,8 @@ import Network.HTTP.Client (managerSetProxy,
import Network.HTTP.Client.TLS (tlsManagerSettings)
import Network.HTTP.ReverseProxy (ProxyDest (ProxyDest),
waiProxyToSettings,
wpsOnExc, wpsTimeout)
wpsOnExc, wpsTimeout,
defaultWaiProxySettings)
import qualified Network.HTTP.ReverseProxy as ReverseProxy
import Network.HTTP.Types (status200, status503)
import qualified Network.Socket
@ -147,7 +147,7 @@ reverseProxy opts appPortVar = do
return $
ReverseProxy.WPRProxyDest
$ ProxyDest "127.0.0.1" appPort)
def
defaultWaiProxySettings
{ wpsOnExc = \e req f -> onExc e req >>= f
, wpsTimeout =
if proxyTimeout opts == 0

View File

@ -1,5 +1,5 @@
name: yesod-bin
version: 1.6.0
version: 1.6.0.1
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>