This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new ff4f59341215 [SPARK-46239][CORE] Hide `Jetty` info
ff4f59341215 is described below
commit ff4f59341215b7f3a87e6cd8798d49e25562fcd6
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Dec 4 14:41:27 2023 -0800
[SPARK-46239][CORE] Hide `Jetty` info
**What changes were proposed in this pull request?**
The PR sets parameters to hide the version of jetty in spark.
**Why are the changes needed?**
It can avoid obtaining remote WWW service information through HTTP.
**Does this PR introduce any user-facing change?**
No
**How was this patch tested?**
Manual review
**Was this patch authored or co-authored using generative AI tooling?**
No
Closes #44158 from chenyu-opensource/branch-SPARK-46239.
Lead-authored-by: Dongjoon Hyun <[email protected]>
Co-authored-by: chenyu
<[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
core/src/main/scala/org/apache/spark/ui/JettyUtils.scala | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
b/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
index 22adcbc32ed8..50251975d733 100644
--- a/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
+++ b/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
@@ -314,6 +314,12 @@ private[spark] object JettyUtils extends Logging {
logDebug(s"Using requestHeaderSize: $requestHeaderSize")
httpConfig.setRequestHeaderSize(requestHeaderSize)
+ // Hide information.
+ logDebug("Using setSendServerVersion: false")
+ httpConfig.setSendServerVersion(false)
+ logDebug("Using setSendXPoweredBy: false")
+ httpConfig.setSendXPoweredBy(false)
+
// If SSL is configured, create the secure connector first.
val securePort = sslOptions.createJettySslContextFactory().map { factory
=>
val securePort = sslOptions.port.getOrElse(if (port > 0)
Utils.userPort(port, 400) else 0)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]