public class Netty3CorsHandler
extends org.jboss.netty.channel.SimpleChannelUpstreamHandler
This handler can be configured using a Netty3CorsConfig, please
refer to this class for details about the configuration options available.
This code was borrowed from Netty 4 and refactored to work for Elasticsearch's Netty 3 setup.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ANY_ORIGIN |
| Constructor and Description |
|---|
Netty3CorsHandler(Netty3CorsConfig config)
Creates a new instance with the specified
Netty3CorsConfig. |
| Modifier and Type | Method and Description |
|---|---|
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e) |
static void |
setCorsResponseHeaders(org.jboss.netty.handler.codec.http.HttpRequest request,
org.jboss.netty.handler.codec.http.HttpResponse resp,
Netty3CorsConfig config) |
public static final java.lang.String ANY_ORIGIN
public Netty3CorsHandler(Netty3CorsConfig config)
Netty3CorsConfig.public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
throws java.lang.Exception
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandlerjava.lang.Exceptionpublic static void setCorsResponseHeaders(org.jboss.netty.handler.codec.http.HttpRequest request,
org.jboss.netty.handler.codec.http.HttpResponse resp,
Netty3CorsConfig config)