-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
126 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd"> | ||
<Configure id="Server" class="org.eclipse.jetty.server.Server"> | ||
|
||
<Arg name="threadpool"> | ||
<New id="threadpool" class="org.sonatype.nexus.bootstrap.jetty.InstrumentedQueuedThreadPool"> | ||
<Set name="maxThreads">400</Set> | ||
</New> | ||
</Arg> | ||
|
||
<New id="NexusHandler" class="org.sonatype.nexus.bootstrap.jetty.InstrumentedHandler"> | ||
<Arg> | ||
<New id="NexusWebAppContext" class="org.eclipse.jetty.webapp.WebAppContext"> | ||
<Set name="descriptor"><Property name="jetty.etc"/>/nexus-web.xml</Set> | ||
<!-- Fix CVE-2024-4956 https://support.sonatype.com/hc/en-us/articles/29412417068819-Mitigations-for-CVE-2024-4956-Nexus-Repository-3-Vulnerability --> | ||
<!-- <Set name="resourceBase"><Property name="karaf.base"/>/public</Set> --> | ||
<Set name="contextPath"><Property name="nexus-context-path"/></Set> | ||
<Set name="throwUnavailableOnStartupException">true</Set> | ||
<Set name="configurationClasses"> | ||
<Array type="java.lang.String"> | ||
<Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item> | ||
</Array> | ||
</Set> | ||
</New> | ||
</Arg> | ||
</New> | ||
|
||
<Set name="handler"> | ||
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"> | ||
<Set name="handlers"> | ||
<Array type="org.eclipse.jetty.server.Handler"> | ||
<Item> | ||
<Ref refid="NexusHandler"/> | ||
</Item> | ||
</Array> | ||
</Set> | ||
</New> | ||
</Set> | ||
|
||
<Set name="stopAtShutdown">true</Set> | ||
<Set name="stopTimeout"><Property name="jetty.stop.timeout" default="5000"/></Set> | ||
<Set name="dumpAfterStart"><Property name="jetty.dump.start" default="false"/></Set> | ||
<Set name="dumpBeforeStop"><Property name="jetty.dump.stop" default="false"/></Set> | ||
|
||
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration"> | ||
<Set name="outputBufferSize"> | ||
<Property name="jetty.output.buffer.size" default="32768"/> | ||
</Set> | ||
<Set name="outputAggregationSize"> | ||
<Property name="jetty.output.aggregation.size" default="8192"/> | ||
</Set> | ||
<Set name="requestHeaderSize"> | ||
<Property name="jetty.request.header.size" default="8192"/> | ||
</Set> | ||
<Set name="responseHeaderSize"> | ||
<Property name="jetty.response.header.size" default="8192"/> | ||
</Set> | ||
<Set name="sendServerVersion"> | ||
<Property name="jetty.send.server.version" default="true"/> | ||
</Set> | ||
<Set name="sendDateHeader"> | ||
<Property name="jetty.send.date.header" default="true"/> | ||
</Set> | ||
<Set name="headerCacheSize">512</Set> | ||
<Set name="delayDispatchUntilContent"> | ||
<Property name="jetty.delayDispatchUntilContent" default="false"/> | ||
</Set> | ||
<Call name="addCustomizer"> | ||
<Arg> | ||
<New class="org.sonatype.nexus.bootstrap.jetty.DockerSubdomainRequestCustomizer"> | ||
<Arg> | ||
<Property name="nexus-context-path"/> | ||
</Arg> | ||
<Arg type="int"> | ||
<Property name="application-port" default="-1"/> | ||
</Arg> | ||
<Arg type="int"> | ||
<Property name="application-port-ssl" default="-1"/> | ||
</Arg> | ||
</New> | ||
</Arg> | ||
</Call> | ||
<Call name="addCustomizer"> | ||
<Arg> | ||
<New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/> | ||
</Arg> | ||
</Call> | ||
</New> | ||
|
||
<!-- =========================================================== --> | ||
<!-- Get the platform MBeanServer --> | ||
<!-- =========================================================== --> | ||
<Call id="MBeanServer" class="java.lang.management.ManagementFactory" name="getPlatformMBeanServer" /> | ||
|
||
<!-- =========================================================== --> | ||
<!-- Initialize the Jetty MBeanContainer --> | ||
<!-- =========================================================== --> | ||
<Call name="addBean"> | ||
<Arg> | ||
<New id="MBeanContainer" class="org.eclipse.jetty.jmx.MBeanContainer"> | ||
<Arg> | ||
<Ref refid="MBeanServer" /> | ||
</Arg> | ||
</New> | ||
</Arg> | ||
</Call> | ||
|
||
<!-- Add the static log --> | ||
<Call name="addBean"> | ||
<Arg> | ||
<Get class="org.eclipse.jetty.util.log.Log" name="Log" /> | ||
</Arg> | ||
</Call> | ||
|
||
</Configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters