Fix broken http-reverse-proxy < 0.6 support
This commit is contained in:
parent
07df43f207
commit
bc4ecd7dc8
@ -1,3 +1,7 @@
|
|||||||
|
## 1.6.0.2
|
||||||
|
|
||||||
|
* Fix broken support for older http-reverse-proxy
|
||||||
|
|
||||||
## 1.6.0.1
|
## 1.6.0.1
|
||||||
|
|
||||||
* Support for http-reverse-proxy 0.6
|
* Support for http-reverse-proxy 0.6
|
||||||
|
|||||||
@ -38,7 +38,12 @@ import Network.HTTP.Client.TLS (tlsManagerSettings)
|
|||||||
import Network.HTTP.ReverseProxy (ProxyDest (ProxyDest),
|
import Network.HTTP.ReverseProxy (ProxyDest (ProxyDest),
|
||||||
waiProxyToSettings,
|
waiProxyToSettings,
|
||||||
wpsOnExc, wpsTimeout,
|
wpsOnExc, wpsTimeout,
|
||||||
defaultWaiProxySettings)
|
#if MIN_VERSION_http_reverse_proxy(0, 6, 0)
|
||||||
|
defaultWaiProxySettings
|
||||||
|
#else
|
||||||
|
def
|
||||||
|
#endif
|
||||||
|
)
|
||||||
import qualified Network.HTTP.ReverseProxy as ReverseProxy
|
import qualified Network.HTTP.ReverseProxy as ReverseProxy
|
||||||
import Network.HTTP.Types (status200, status503)
|
import Network.HTTP.Types (status200, status503)
|
||||||
import qualified Network.Socket
|
import qualified Network.Socket
|
||||||
@ -147,7 +152,11 @@ reverseProxy opts appPortVar = do
|
|||||||
return $
|
return $
|
||||||
ReverseProxy.WPRProxyDest
|
ReverseProxy.WPRProxyDest
|
||||||
$ ProxyDest "127.0.0.1" appPort)
|
$ ProxyDest "127.0.0.1" appPort)
|
||||||
|
#if MIN_VERSION_http_reverse_proxy(0, 6, 0)
|
||||||
defaultWaiProxySettings
|
defaultWaiProxySettings
|
||||||
|
#else
|
||||||
|
def
|
||||||
|
#endif
|
||||||
{ wpsOnExc = \e req f -> onExc e req >>= f
|
{ wpsOnExc = \e req f -> onExc e req >>= f
|
||||||
, wpsTimeout =
|
, wpsTimeout =
|
||||||
if proxyTimeout opts == 0
|
if proxyTimeout opts == 0
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-bin
|
name: yesod-bin
|
||||||
version: 1.6.0.1
|
version: 1.6.0.2
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user