Package org.elasticsearch.http
Class CorsHandler
java.lang.Object
org.elasticsearch.http.CorsHandler
public class CorsHandler
extends java.lang.Object
This file is forked from the https://netty.io project. In particular it combines the following three
files: io.netty.handler.codec.http.cors.CorsHandler, io.netty.handler.codec.http.cors.CorsConfig, and
io.netty.handler.codec.http.cors.CorsConfigBuilder.
It modifies the original netty code to operate on Elasticsearch http request/response abstractions.
Additionally, it removes CORS features that are not used by Elasticsearch.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCorsHandler.Config -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACCESS_CONTROL_ALLOW_CREDENTIALSstatic java.lang.StringACCESS_CONTROL_ALLOW_HEADERSstatic java.lang.StringACCESS_CONTROL_ALLOW_METHODSstatic java.lang.StringACCESS_CONTROL_ALLOW_ORIGINstatic java.lang.StringACCESS_CONTROL_MAX_AGEstatic java.lang.StringACCESS_CONTROL_REQUEST_METHODstatic java.lang.StringANY_ORIGINstatic java.lang.StringDATEstatic java.lang.StringHOSTstatic java.lang.StringORIGINstatic java.lang.StringVARY -
Constructor Summary
Constructors Constructor Description CorsHandler(CorsHandler.Config config) -
Method Summary
Modifier and Type Method Description static CorsHandler.ConfigbuildConfig(Settings settings)static CorsHandlerdisabled()static CorsHandlerfromSettings(Settings settings)HttpResponsehandleInbound(HttpRequest request)voidsetCorsResponseHeaders(HttpRequest httpRequest, HttpResponse httpResponse)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
ANY_ORIGIN
public static final java.lang.String ANY_ORIGIN- See Also:
- Constant Field Values
-
ORIGIN
public static final java.lang.String ORIGIN- See Also:
- Constant Field Values
-
DATE
public static final java.lang.String DATE- See Also:
- Constant Field Values
-
VARY
public static final java.lang.String VARY- See Also:
- Constant Field Values
-
HOST
public static final java.lang.String HOST- See Also:
- Constant Field Values
-
ACCESS_CONTROL_REQUEST_METHOD
public static final java.lang.String ACCESS_CONTROL_REQUEST_METHOD- See Also:
- Constant Field Values
-
ACCESS_CONTROL_ALLOW_HEADERS
public static final java.lang.String ACCESS_CONTROL_ALLOW_HEADERS- See Also:
- Constant Field Values
-
ACCESS_CONTROL_ALLOW_CREDENTIALS
public static final java.lang.String ACCESS_CONTROL_ALLOW_CREDENTIALS- See Also:
- Constant Field Values
-
ACCESS_CONTROL_ALLOW_METHODS
public static final java.lang.String ACCESS_CONTROL_ALLOW_METHODS- See Also:
- Constant Field Values
-
ACCESS_CONTROL_ALLOW_ORIGIN
public static final java.lang.String ACCESS_CONTROL_ALLOW_ORIGIN- See Also:
- Constant Field Values
-
ACCESS_CONTROL_MAX_AGE
public static final java.lang.String ACCESS_CONTROL_MAX_AGE- See Also:
- Constant Field Values
-
-
Constructor Details
-
CorsHandler
-
-
Method Details
-
handleInbound
-
setCorsResponseHeaders
-
disabled
-
buildConfig
-
fromSettings
-