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