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
ConstructorsConstructorDescriptionCreates a newCorsHandlerwith default options.CorsHandler(Cors options) Creates a newCorsHandler. -
Method Summary
Modifier and TypeMethodDescriptionapply(Route.Handler next) Chain the filter within next handler.voidAllows a handler to listen for route metadata.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 newCorsHandlerwith default options.
-
-
Method Details
-
apply
Description copied from interface:Route.FilterChain the filter within next handler.- Specified by:
applyin interfaceRoute.Filter- Parameters:
next- Next handler.- Returns:
- A new handler.
-
setRoute
Description copied from interface:Route.AwareAllows a handler to listen for route metadata.- Specified by:
setRoutein interfaceRoute.Aware- Parameters:
route- Route metadata.
-