mirror of
https://github.com/apache/lucene.git
synced 2025-02-09 11:35:14 +00:00
Prior to this commit, Solr's Jetty listened for connections on all network interfaces. This commit changes it to only listen on localhost, to prevent incautious administrators from accidentally exposing their Solr deployment to the world. Administrators who wish to override this behavior can set the SOLR_JETTY_HOST property in their Solr include file (solr.in.sh/solr.in.cmd) to "0.0.0.0" or some other value. A version of this commit was previously reverted due to inconsistency between SOLR_HOST and SOLR_JETTY_HOST. This commit fixes this issue.
51 lines
2.6 KiB
XML
51 lines
2.6 KiB
XML
<?xml version="1.0"?>
|
|
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
|
|
|
<!-- ============================================================= -->
|
|
<!-- Configure the Jetty Server instance with an ID "Server" -->
|
|
<!-- by adding a HTTP connector. -->
|
|
<!-- This configuration must be used in conjunction with jetty.xml -->
|
|
<!-- ============================================================= -->
|
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
|
|
|
<!-- =========================================================== -->
|
|
<!-- Add a HTTP Connector. -->
|
|
<!-- Configure an o.e.j.server.ServerConnector with a single -->
|
|
<!-- HttpConnectionFactory instance using the common httpConfig -->
|
|
<!-- instance defined in jetty.xml -->
|
|
<!-- -->
|
|
<!-- Consult the javadoc of o.e.j.server.ServerConnector and -->
|
|
<!-- o.e.j.server.HttpConnectionFactory for all configuration -->
|
|
<!-- that may be set here. -->
|
|
<!-- =========================================================== -->
|
|
<Call name="addConnector">
|
|
<Arg>
|
|
<New class="org.eclipse.jetty.server.ServerConnector">
|
|
<Arg name="server"><Ref refid="Server" /></Arg>
|
|
<Arg name="acceptors" type="int"><Property name="solr.jetty.http.acceptors" default="-1"/></Arg>
|
|
<Arg name="selectors" type="int"><Property name="solr.jetty.http.selectors" default="-1"/></Arg>
|
|
<Arg name="factories">
|
|
<Array type="org.eclipse.jetty.server.ConnectionFactory">
|
|
<Item>
|
|
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
|
|
<Arg name="config"><Ref refid="httpConfig" /></Arg>
|
|
</New>
|
|
</Item>
|
|
<Item>
|
|
<New class="org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory">
|
|
<Arg name="config"><Ref refid="httpConfig" /></Arg>
|
|
</New>
|
|
</Item>
|
|
</Array>
|
|
</Arg>
|
|
<Set name="host"><Property name="solr.jetty.host" default="127.0.0.1"/></Set>
|
|
<Set name="port"><Property name="jetty.port" default="8983" /></Set>
|
|
<Set name="idleTimeout"><Property name="solr.jetty.http.idleTimeout" default="120000"/></Set>
|
|
<Set name="acceptorPriorityDelta"><Property name="solr.jetty.http.acceptorPriorityDelta" default="0"/></Set>
|
|
<Set name="acceptQueueSize"><Property name="solr.jetty.http.acceptQueueSize" default="0"/></Set>
|
|
</New>
|
|
</Arg>
|
|
</Call>
|
|
|
|
</Configure>
|