Package com.linecorp.armeria.server.cors
Class CorsService
java.lang.Object
com.linecorp.armeria.common.util.AbstractUnwrappable<Service<HttpRequest,HttpResponse>>
com.linecorp.armeria.server.DecoratingService<HttpRequest,HttpResponse,HttpRequest,HttpResponse>
com.linecorp.armeria.server.SimpleDecoratingService<HttpRequest,HttpResponse>
com.linecorp.armeria.server.SimpleDecoratingHttpService
com.linecorp.armeria.server.cors.CorsService
- All Implemented Interfaces:
Unwrappable,HttpService,Service<HttpRequest,HttpResponse>
Decorates an
HttpService to add the
Cross-Origin Resource Sharing
(CORS) support.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic CorsServiceBuilderReturns a newCorsServiceBuilderwith the specifiedorigins.static CorsServiceBuilderReturns a newCorsServiceBuilderwith the specifiedorigins.static CorsServiceBuilderReturns a newCorsServiceBuilderwith origins matching theoriginPredicate.static CorsServiceBuilderReturns a newCorsServiceBuilderwith its origin set with"*"(any origin).static CorsServiceBuilderbuilderForOriginRegex(String originRegex) Returns a newCorsServiceBuilderwith origins matching theoriginRegex.static CorsServiceBuilderbuilderForOriginRegex(Pattern originRegex) Returns a newCorsServiceBuilderwith origins matching theoriginRegex.config()Returns theCorsConfig.serve(ServiceRequestContext ctx, HttpRequest req) Serves an incomingRequest.Methods inherited from class com.linecorp.armeria.server.SimpleDecoratingHttpService
exchangeType, optionsMethods inherited from class com.linecorp.armeria.server.DecoratingService
serviceAdded, shouldCachePathMethods inherited from class com.linecorp.armeria.common.util.AbstractUnwrappable
as, toString, unwrap, unwrapAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.linecorp.armeria.server.HttpService
decorate, decorateMethods inherited from interface com.linecorp.armeria.server.Service
as, serviceAdded, shouldCachePath, unwrapMethods inherited from interface com.linecorp.armeria.common.util.Unwrappable
equalsIgnoreWrapper, unwrapAll
-
Method Details
-
builderForAnyOrigin
Returns a newCorsServiceBuilderwith its origin set with"*"(any origin). -
builder
Returns a newCorsServiceBuilderwith the specifiedorigins. -
builder
Returns a newCorsServiceBuilderwith the specifiedorigins. -
builder
Returns a newCorsServiceBuilderwith origins matching theoriginPredicate. -
builderForOriginRegex
Returns a newCorsServiceBuilderwith origins matching theoriginRegex. -
builderForOriginRegex
Returns a newCorsServiceBuilderwith origins matching theoriginRegex. -
config
Returns theCorsConfig. -
serve
Description copied from interface:ServiceServes an incomingRequest.
-