diff --git a/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpServerTransport.java b/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpServerTransport.java index a5fdb0a444f8d..1677f333a4b1c 100644 --- a/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpServerTransport.java +++ b/modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpServerTransport.java @@ -533,11 +533,19 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { } } + /** + * Extension point that allows a NetworkPlugin to extend the netty pipeline and inspect headers after request decoding + */ protected ChannelInboundHandlerAdapter createHeaderVerifier() { // pass-through return new ChannelInboundHandlerAdapter(); } + /** + * Extension point that allows a NetworkPlugin to override the default netty HttpContentDecompressor and supply a custom decompressor. + * + * Used in instances to conditionally decompress depending on the outcome from header verification + */ protected ChannelInboundHandlerAdapter createDecompressor() { return new HttpContentDecompressor(); }