java.lang.Object
io.jooby.handler.CorsHandler
- All Implemented Interfaces:
Route.Aware
,Route.Filter
Handle preflight and simple CORS requests. CORS options are set via:
Cors
.- Since:
- 2.0.4
- Author:
- edgar
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a newCorsHandler
with default options.CorsHandler
(Cors options) Creates a newCorsHandler
. -
Method Summary
Modifier and TypeMethodDescriptionapply
(Route.Handler next) Chain the filter within next handler.void
Allows a handler to listen for route metadata.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jooby.Route.Filter
then, then
-
Constructor Details
-
CorsHandler
Creates a newCorsHandler
.- Parameters:
options
- Cors options, or empty for using default options.
-
CorsHandler
public CorsHandler()Creates a newCorsHandler
with default options.
-
-
Method Details
-
apply
Description copied from interface:Route.Filter
Chain the filter within next handler.- Specified by:
apply
in interfaceRoute.Filter
- Parameters:
next
- Next handler.- Returns:
- A new handler.
-
setRoute
Description copied from interface:Route.Aware
Allows a handler to listen for route metadata.- Specified by:
setRoute
in interfaceRoute.Aware
- Parameters:
route
- Route metadata.
-