Nflrijal commented on code in PR #58243:
URL: https://github.com/apache/spark/pull/58243#discussion_r3899493731


##########
core/src/main/scala/org/apache/spark/deploy/master/ui/MasterWebUI.scala:
##########
@@ -64,10 +65,15 @@ class MasterWebUI(
     addStaticHandler(MasterWebUI.STATIC_RESOURCE_DIR)
     addRenderLogHandler(this, master.conf)
     if (killEnabled) {
+      val killRedirectTarget = master.conf.get(UI_REVERSE_PROXY_URL)
+        .map(_.stripSuffix("/") + "/")

Review Comment:
   Guarded killRedirectTarget with master.conf.get(UI_REVERSE_PROXY) and 
checked master.conf.get(PROXY_REDIRECT_URI).isEmpty to avoid double-prefixing 
when ProxyRedirectHandler is active and honor reverseProxy=false when disabled. 
Added unit test in MasterWebUISuite.



##########
core/src/main/scala/org/apache/spark/deploy/master/ui/MasterWebUI.scala:
##########
@@ -64,10 +65,15 @@ class MasterWebUI(
     addStaticHandler(MasterWebUI.STATIC_RESOURCE_DIR)
     addRenderLogHandler(this, master.conf)
     if (killEnabled) {
+      val killRedirectTarget = master.conf.get(UI_REVERSE_PROXY_URL)

Review Comment:
   Guarded killRedirectTarget with master.conf.get(UI_REVERSE_PROXY) and 
checked master.conf.get(PROXY_REDIRECT_URI).isEmpty to avoid double-prefixing 
when ProxyRedirectHandler is active and honor reverseProxy=false when disabled. 
Added unit test in MasterWebUISuite.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to