public final class CorsService extends SimpleDecoratingHttpService
HttpService to add the
Cross-Origin Resource Sharing
(CORS) support.CorsServiceBuilder| Constructor and Description |
|---|
CorsService(HttpService delegate,
CorsConfig config)
Creates a new
CorsService that decorates the specified delegate to add CORS support. |
| Modifier and Type | Method and Description |
|---|---|
CorsConfig |
config()
Returns the
CorsConfig. |
HttpResponse |
serve(ServiceRequestContext ctx,
HttpRequest req)
Serves an incoming
Request. |
serviceAdded, shouldCachePathas, delegate, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdecorate, decorateas, decorate, serviceAdded, shouldCachePathpublic CorsService(HttpService delegate, CorsConfig config)
CorsService that decorates the specified delegate to add CORS support.public CorsConfig config()
CorsConfig.public HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception
ServiceRequest.Copyright © 2020 LeanCloud. All rights reserved.