refactor: Remove Protolude.Conv from Proxy

This commit is contained in:
monacoremo
2021-11-12 20:25:22 +01:00
committed by Remo
parent 3820590649
commit f228cccbae
+5 -6
View File
@@ -8,13 +8,12 @@ module PostgREST.Config.Proxy
, toURI , toURI
) where ) where
import qualified Data.Text as T
import Data.Maybe (fromJust) import Data.Maybe (fromJust)
import Data.Text (pack, toLower)
import Network.URI (URI (..), URIAuth (..), isAbsoluteURI, parseURI) import Network.URI (URI (..), URIAuth (..), isAbsoluteURI, parseURI)
import Protolude hiding (Proxy, dropWhile, get, intercalate, import Protolude hiding (Proxy)
toLower, toS, (&))
import Protolude.Conv (toS)
data Proxy = Proxy data Proxy = Proxy
{ proxyScheme :: Text { proxyScheme :: Text
@@ -48,8 +47,8 @@ fAnd fs x = all ($ x) fs
isSchemeValid :: URI -> Bool isSchemeValid :: URI -> Bool
isSchemeValid URI {uriScheme = s} isSchemeValid URI {uriScheme = s}
| toLower (pack s) == "https:" = True | T.toLower (T.pack s) == "https:" = True
| toLower (pack s) == "http:" = True | T.toLower (T.pack s) == "http:" = True
| otherwise = False | otherwise = False
isQueryValid :: URI -> Bool isQueryValid :: URI -> Bool