public class CorsHandler extends Object implements Route.Decorator
Cors
.Cors
Constructor and Description |
---|
CorsHandler()
Creates a new
CorsHandler with default options. |
CorsHandler(Cors options)
Creates a new
CorsHandler . |
Modifier and Type | Method and Description |
---|---|
Route.Handler |
apply(Route.Handler next)
Chain the decorator within next handler.
|
void |
setRoute(Route route)
Allows a handler to listen for route metadata.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
then, then
public CorsHandler(@Nonnull Cors options)
CorsHandler
.options
- Cors options, or empty for using default options.public CorsHandler()
CorsHandler
with default options.@Nonnull public Route.Handler apply(@Nonnull Route.Handler next)
Route.Decorator
apply
in interface Route.Decorator
next
- Next handler.@Nonnull public void setRoute(@Nonnull Route route)
Route.Aware
setRoute
in interface Route.Aware
route
- Route metadata.Copyright © 2020. All rights reserved.