File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ import Data.Streaming.Network (AppData, readLens)
6363import qualified Data.Text.Lazy as TL
6464import qualified Data.Text.Lazy.Encoding as TLE
6565import qualified Data.Text as T
66- import qualified Data.Text.Encoding as TE
6766import Data.Word8 (isSpace , _colon , _cr )
6867import GHC.Generics (Generic )
6968import Network.HTTP.Client (BodyReader , brRead )
@@ -362,7 +361,7 @@ fixReqHeaders wps req =
362361 fromSocket = ((" X-Real-IP" , S8. pack $ showSockAddr $ WAI. remoteHost req): )
363362 fromForwardedFor = do
364363 h <- lookup " x-forwarded-for" (WAI. requestHeaders req)
365- listToMaybe $ map ( TE. encodeUtf8 . T. strip) $ T. splitOn " , " $ TE. decodeUtf8 h
364+ listToMaybe $ map S8. strip $ S8. split ' , ' h
366365 addXRealIP =
367366 case wpsSetIpHeader wps of
368367 SIHFromSocket -> fromSocket
You can’t perform that action at this time.
0 commit comments