This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit aba0c9a488a7d7e5063779e88f652cdca439cd24 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Jan 21 13:02:13 2020 +0000 Change the default bind address for AJP to the loopback address --- java/org/apache/coyote/ajp/AbstractAjpProtocol.java | 4 ++++ webapps/docs/config/ajp.xml | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java index 2500abd..8e0593b 100644 --- a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java +++ b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java @@ -16,6 +16,8 @@ */ package org.apache.coyote.ajp; +import java.net.InetAddress; + import org.apache.coyote.AbstractProtocol; import org.apache.coyote.Processor; import org.apache.coyote.UpgradeProtocol; @@ -46,6 +48,8 @@ public abstract class AbstractAjpProtocol<S> extends AbstractProtocol<S> { setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); // AJP does not use Send File getEndpoint().setUseSendfile(false); + // AJP listens on loopback by default + getEndpoint().setAddress(InetAddress.getLoopbackAddress()); ConnectionHandler<S> cHandler = new ConnectionHandler<>(this); setHandler(cHandler); getEndpoint().setHandler(cHandler); diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml index c70af91..5535a06 100644 --- a/webapps/docs/config/ajp.xml +++ b/webapps/docs/config/ajp.xml @@ -308,10 +308,7 @@ <attribute name="address" required="false"> <p>For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified - port. By default, this port will be used on all IP addresses - associated with the server. A value of <code>127.0.0.1</code> - indicates that the Connector will only listen on the loopback - interface.</p> + port. By default, the loopback address will be used.</p> </attribute> <attribute name="bindOnInit" required="false"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org