Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data Cors = Cors' {
- allowCredentials :: Maybe Bool
- allowHeaders :: Maybe [Text]
- allowMethods :: Maybe [Text]
- allowOrigins :: Maybe [Text]
- exposeHeaders :: Maybe [Text]
- maxAge :: Maybe Int
- newCors :: Cors
- cors_allowCredentials :: Lens' Cors (Maybe Bool)
- cors_allowHeaders :: Lens' Cors (Maybe [Text])
- cors_allowMethods :: Lens' Cors (Maybe [Text])
- cors_allowOrigins :: Lens' Cors (Maybe [Text])
- cors_exposeHeaders :: Lens' Cors (Maybe [Text])
- cors_maxAge :: Lens' Cors (Maybe Int)
Documentation
Represents a CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.
See: newCors
smart constructor.
Cors' | |
|
Instances
Create a value of Cors
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:allowCredentials:Cors'
, cors_allowCredentials
- Specifies whether credentials are included in the CORS request.
Supported only for HTTP APIs.
$sel:allowHeaders:Cors'
, cors_allowHeaders
- Represents a collection of allowed headers. Supported only for HTTP
APIs.
$sel:allowMethods:Cors'
, cors_allowMethods
- Represents a collection of allowed HTTP methods. Supported only for HTTP
APIs.
$sel:allowOrigins:Cors'
, cors_allowOrigins
- Represents a collection of allowed origins. Supported only for HTTP
APIs.
$sel:exposeHeaders:Cors'
, cors_exposeHeaders
- Represents a collection of exposed headers. Supported only for HTTP
APIs.
$sel:maxAge:Cors'
, cors_maxAge
- The number of seconds that the browser should cache preflight request
results. Supported only for HTTP APIs.
cors_allowCredentials :: Lens' Cors (Maybe Bool) Source #
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
cors_allowHeaders :: Lens' Cors (Maybe [Text]) Source #
Represents a collection of allowed headers. Supported only for HTTP APIs.
cors_allowMethods :: Lens' Cors (Maybe [Text]) Source #
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
cors_allowOrigins :: Lens' Cors (Maybe [Text]) Source #
Represents a collection of allowed origins. Supported only for HTTP APIs.