Ip Filter: Allow to disable via node configuration
Added `shield.n2n.enabled` property to disable this feature, so it does not get added to the netty pipeline. Original commit: elastic/x-pack-elasticsearch@d73d27619c
This commit is contained in:
parent
c9379b3875
commit
f73645054b
|
@ -57,7 +57,9 @@ public class NettySecuredHttpServerTransport extends NettyHttpServerTransport {
|
|||
@Override
|
||||
public ChannelPipeline getPipeline() throws Exception {
|
||||
ChannelPipeline pipeline = super.getPipeline();
|
||||
if (settings.getAsBoolean("shield.n2n.enabled", true)) {
|
||||
pipeline.addFirst("ipfilter", shieldUpstreamHandler);
|
||||
}
|
||||
if (ssl) {
|
||||
SSLEngine engine = sslConfig.createSSLEngine();
|
||||
engine.setUseClientMode(false);
|
||||
|
|
|
@ -64,7 +64,9 @@ public class NettySecuredTransport extends NettyTransport {
|
|||
@Override
|
||||
public ChannelPipeline getPipeline() throws Exception {
|
||||
ChannelPipeline pipeline = super.getPipeline();
|
||||
if (settings.getAsBoolean("shield.n2n.enabled", true)) {
|
||||
pipeline.addFirst("ipfilter", shieldUpstreamHandler);
|
||||
}
|
||||
if (ssl) {
|
||||
SSLEngine serverEngine = sslConfig.createSSLEngine();
|
||||
serverEngine.setUseClientMode(false);
|
||||
|
|
Loading…
Reference in New Issue