new CorsHandler()
A handler which implements server side http://www.w3.org/TR/cors/[CORS] support for Vert.x-Web.
- Source:
Methods
allowCredentials(allow) → {CorsHandler}
Set whether credentials are allowed
Parameters:
Name | Type | Description |
---|---|---|
allow |
boolean | true if allowed |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- CorsHandler
allowedHeader(headerName) → {CorsHandler}
Add an allowed header
Parameters:
Name | Type | Description |
---|---|---|
headerName |
string | the allowed header name |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- CorsHandler
allowedHeaders(headerNames) → {CorsHandler}
Add a set of allowed headers
Parameters:
Name | Type | Description |
---|---|---|
headerNames |
Array.<string> | the allowed header names |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- CorsHandler
allowedMethod(method) → {CorsHandler}
Add an allowed method
Parameters:
Name | Type | Description |
---|---|---|
method |
Object | the method to add |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- CorsHandler
exposedHeader(headerName) → {CorsHandler}
Add an exposed header
Parameters:
Name | Type | Description |
---|---|---|
headerName |
string | the exposed header name |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- CorsHandler
exposedHeaders(headerNames) → {CorsHandler}
Add a set of exposed headers
Parameters:
Name | Type | Description |
---|---|---|
headerNames |
Array.<string> | the exposed header names |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- CorsHandler
handle(arg0)
Parameters:
Name | Type | Description |
---|---|---|
arg0 |
RoutingContext |
- Source:
maxAgeSeconds(maxAgeSeconds) → {CorsHandler}
Set how long the browser should cache the information
Parameters:
Name | Type | Description |
---|---|---|
maxAgeSeconds |
number | max age in seconds |
- Source:
Returns:
a reference to this, so the API can be used fluently
- Type
- CorsHandler