refactor: Remove Protolude.Conv from Proxy
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user