Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/src/main/scala/org/apache/spark/ui/WebUI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ private[spark] abstract class WebUI(
}

/** Return the url of web interface. Only valid after bind(). */
def webUrl: String = s"http://$publicHostName:$boundPort"
def webUrl: String = {
val protocol = if (sslOptions.enabled) "https" else "http"
s"$protocol://$publicHostName:$boundPort"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: don't indent this line further

}

/** Return the actual port to which this server is bound. Only valid after bind(). */
def boundPort: Int = serverInfo.map(_.boundPort).getOrElse(-1)
Expand Down