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)
63
63
import qualified Data.Text.Lazy as TL
64
64
import qualified Data.Text.Lazy.Encoding as TLE
65
65
import qualified Data.Text as T
66
- import qualified Data.Text.Encoding as TE
67
66
import Data.Word8 (isSpace , _colon , _cr )
68
67
import GHC.Generics (Generic )
69
68
import Network.HTTP.Client (BodyReader , brRead )
@@ -362,7 +361,7 @@ fixReqHeaders wps req =
362
361
fromSocket = ((" X-Real-IP" , S8. pack $ showSockAddr $ WAI. remoteHost req): )
363
362
fromForwardedFor = do
364
363
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
366
365
addXRealIP =
367
366
case wpsSetIpHeader wps of
368
367
SIHFromSocket -> fromSocket
You can’t perform that action at this time.
0 commit comments