This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.4 by this push:
new 757c3a9d62b7 [SPARK-46239][CORE] Hide `Jetty` info
757c3a9d62b7 is described below
commit 757c3a9d62b7519f5bdc50d09e472b0490b6bae8
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]>
(cherry picked from commit ff4f59341215b7f3a87e6cd8798d49e25562fcd6)
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 d8119fb94984..2407152a5498 100644
--- a/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
+++ b/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
@@ -312,6 +312,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]