CorsHandler

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

package

Default

Methods

__construct

__construct() 

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

allowCredentials( $arg0) : $this

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.

Arguments

$arg0

boolean

Response

$this

a reference to this, so the API can be used fluently

Add an allowed header

allowedHeader( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this, so the API can be used fluently

Add a set of allowed headers

allowedHeaders( $arg0) : $this

Arguments

$arg0

array

Response

$this

a reference to this, so the API can be used fluently

Add an allowed method

allowedMethod( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this, so the API can be used fluently

Create a CORS handler

create( $arg0) : \io\vertx\jphp\ext\web\handler\CorsHandler
static

Arguments

$arg0

string

Response

\io\vertx\jphp\ext\web\handler\CorsHandler

the handler

Add an exposed header

exposedHeader( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this, so the API can be used fluently

Add a set of exposed headers

exposedHeaders( $arg0) : $this

Arguments

$arg0

array

Response

$this

a reference to this, so the API can be used fluently

Something has happened, so handle it.

handle( $arg0) : void

Arguments

$arg0

RoutingContext

Set how long the browser should cache the information

maxAgeSeconds( $arg0) : $this

Arguments

$arg0

integer

Response

$this

a reference to this, so the API can be used fluently