public class CorsHandler extends Object implements Handler<RoutingContext>
original
non RX-ified interface using Vert.x codegen.Constructor and Description |
---|
CorsHandler(CorsHandler delegate) |
Modifier and Type | Method and Description |
---|---|
CorsHandler |
allowCredentials(boolean allow)
Set whether credentials are allowed
|
CorsHandler |
allowedHeader(String headerName)
Add an allowed header
|
CorsHandler |
allowedHeaders(Set<String> headerNames)
Add a set of allowed headers
|
CorsHandler |
allowedMethod(HttpMethod method)
Add an allowed method
|
static CorsHandler |
create(String allowedOriginPattern)
Create a CORS handler
|
CorsHandler |
exposedHeader(String headerName)
Add an exposed header
|
CorsHandler |
exposedHeaders(Set<String> headerNames)
Add a set of exposed headers
|
Object |
getDelegate() |
void |
handle(RoutingContext arg0)
Something has happened, so handle it.
|
CorsHandler |
maxAgeSeconds(int maxAgeSeconds)
Set how long the browser should cache the information
|
static CorsHandler |
newInstance(CorsHandler arg) |
public CorsHandler(CorsHandler delegate)
public Object getDelegate()
public void handle(RoutingContext arg0)
Handler
handle
in interface Handler<RoutingContext>
arg0
- the event to handlepublic static CorsHandler create(String allowedOriginPattern)
allowedOriginPattern
- the allowed origin patternpublic CorsHandler allowedMethod(HttpMethod method)
method
- the method to addpublic CorsHandler allowedHeader(String headerName)
headerName
- the allowed header namepublic CorsHandler allowedHeaders(Set<String> headerNames)
headerNames
- the allowed header namespublic CorsHandler exposedHeader(String headerName)
headerName
- the exposed header namepublic CorsHandler exposedHeaders(Set<String> headerNames)
headerNames
- the exposed header namespublic CorsHandler allowCredentials(boolean allow)
allow
- true if allowedpublic CorsHandler maxAgeSeconds(int maxAgeSeconds)
maxAgeSeconds
- max age in secondspublic static CorsHandler newInstance(CorsHandler arg)
Copyright © 2015. All Rights Reserved.