Module
Bucketchain.CORS
- Package
- purescript-bucketchain-cors
- Repository
- Bucketchain/purescript-bucketchain-cors
#AllowOrigins Source
#AllowCredentials Source
type AllowCredentials = Boolean
The type of Access-Control-Allow-Credentials
.
#AllowMethods Source
type AllowMethods = Array Method
The type of Access-Control-Allow-Methods
.
#AllowHeaders Source
#ExposeHeaders Source
type ExposeHeaders = Array String
The type of Access-Control-Expose-Headers
.
#Options Source
type Options = { allowHeaders :: AllowHeaders, credentials :: AllowCredentials, exposeHeaders :: ExposeHeaders, maxAge :: MaxAge, methods :: AllowMethods, origins :: AllowOrigins }
The type of CORS options.
#defaultOptions Source
defaultOptions :: Options
Default options.
- origins:
AnyOrigin
- credentials:
false
- maxAge:
1728000
- methods:
[ GET, HEAD, PUT, POST, DELETE, PATCH ]
- allowHeaders:
AnyHeader
- exposeHeaders:
[]
#withCORS Source
withCORS :: Options -> Middleware
The CORS middleware.
- Modules
- Bucketchain.
CORS