Safe Haskell | None |
---|---|
Language | Haskell2010 |
CORS (Cross Origin Resource Sharing) related configuration
Synopsis
- data DomainParts = DomainParts {}
- data Domains = Domains {
- dmFqdns :: !(HashSet Text)
- dmWildcards :: !(HashSet DomainParts)
- data CorsConfig
- isCorsDisabled :: CorsConfig -> Bool
- readCorsDomains :: String -> Either String CorsConfig
- data CorsPolicy = CorsPolicy {
- cpConfig :: !CorsConfig
- cpMethods :: ![Text]
- cpMaxAge :: !Int
- mkDefaultCorsPolicy :: CorsConfig -> CorsPolicy
- inWildcardList :: Domains -> Text -> Bool
- runParser :: Parser a -> Text -> Either String a
- parseOrigin :: Text -> Either String DomainParts
- originParser :: Parser DomainParts
- parseOptWildcardDomain :: Text -> Either String (Either Text DomainParts)
- domainParser :: Maybe (Parser Text) -> Parser DomainParts
Documentation
data DomainParts Source #
Domains | |
|
Instances
Eq Domains Source # | |
Show Domains Source # | |
FromJSON Domains Source # | |
Defined in Hasura.Server.Cors parseJSON :: Value -> Parser Domains parseJSONList :: Value -> Parser [Domains] | |
ToJSON Domains Source # | |
Defined in Hasura.Server.Cors toEncoding :: Domains -> Encoding toJSONList :: [Domains] -> Value toEncodingList :: [Domains] -> Encoding |
data CorsConfig Source #
Instances
Eq CorsConfig Source # | |
Defined in Hasura.Server.Cors (==) :: CorsConfig -> CorsConfig -> Bool # (/=) :: CorsConfig -> CorsConfig -> Bool # | |
Show CorsConfig Source # | |
Defined in Hasura.Server.Cors showsPrec :: Int -> CorsConfig -> ShowS # show :: CorsConfig -> String # showList :: [CorsConfig] -> ShowS # | |
FromJSON CorsConfig Source # | |
Defined in Hasura.Server.Cors parseJSON :: Value -> Parser CorsConfig parseJSONList :: Value -> Parser [CorsConfig] | |
ToJSON CorsConfig Source # | |
Defined in Hasura.Server.Cors toJSON :: CorsConfig -> Value toEncoding :: CorsConfig -> Encoding toJSONList :: [CorsConfig] -> Value toEncodingList :: [CorsConfig] -> Encoding | |
FromEnv CorsConfig Source # | |
Defined in Hasura.Server.Init.Env |
isCorsDisabled :: CorsConfig -> Bool Source #
data CorsPolicy Source #
CorsPolicy | |
|
Instances
Eq CorsPolicy Source # | |
Defined in Hasura.Server.Cors (==) :: CorsPolicy -> CorsPolicy -> Bool # (/=) :: CorsPolicy -> CorsPolicy -> Bool # | |
Show CorsPolicy Source # | |
Defined in Hasura.Server.Cors showsPrec :: Int -> CorsPolicy -> ShowS # show :: CorsPolicy -> String # showList :: [CorsPolicy] -> ShowS # |
inWildcardList :: Domains -> Text -> Bool Source #
parseOrigin :: Text -> Either String DomainParts Source #
originParser :: Parser DomainParts Source #
parseOptWildcardDomain :: Text -> Either String (Either Text DomainParts) Source #
domainParser :: Maybe (Parser Text) -> Parser DomainParts Source #