A handler which implements server side http://www.w3.org/TR/cors/[CORS] support for Vert.x-Web.

no subtypes hierarchy

Initializer
CorsHandler(CorsHandler unknown)
Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
allowCredentialsshared default CorsHandler allowCredentials(Boolean allow)

Set whether credentials are allowed. Note that user agents will block requests that use a wildcard as origin and include credentials.

From the MDN documentation you can read:

Important note: when responding to a credentialed request, server must specify a domain, and cannot use wild carding.
Parameters:
  • allow

    true if allowed

allowedHeadershared default CorsHandler allowedHeader(String headerName)

Add an allowed header

Parameters:
  • headerName

    the allowed header name

allowedHeadersshared default CorsHandler allowedHeaders(Set<String> headerNames)

Add a set of allowed headers

Parameters:
  • headerNames

    the allowed header names

allowedMethodshared default CorsHandler allowedMethod(HttpMethod method)

Add an allowed method

Parameters:
  • method

    the method to add

exposedHeadershared default CorsHandler exposedHeader(String headerName)

Add an exposed header

Parameters:
  • headerName

    the exposed header name

exposedHeadersshared default CorsHandler exposedHeaders(Set<String> headerNames)

Add a set of exposed headers

Parameters:
  • headerNames

    the exposed header names

handleshared default void handle(RoutingContext arg0)
maxAgeSecondsshared default CorsHandler maxAgeSeconds(Integer maxAgeSeconds)

Set how long the browser should cache the information

Parameters:
  • maxAgeSeconds

    max age in seconds

Inherited Methods
Methods inherited from: Object
equals