We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48a1eed commit 582d66dCopy full SHA for 582d66d
src/main/scala/com/timzaak/proxy/LogWebViewer.scala
@@ -36,10 +36,11 @@ class LogWebViewer(certPath: Option[String])(using system: ActorSystem) {
36
37
private val viewerEndpoint = endpoint.get
38
.in("")
39
+ .in(query[Option[String]]("ip"))
40
.in(extractFromRequest(identity))
41
.out(htmlBodyUtf8)
- .serverLogicSuccess { request =>
42
- val ip = extractClientIP(request)
+ .serverLogicSuccess { (ipParam, request) =>
43
+ val ip = ipParam.getOrElse(extractClientIP(request))
44
val certDesc = certPath match {
45
case Some(_) =>
46
s"""<p>the server use self signed cert, you may need to register the self signed rootCA.pem to your system. </p>
0 commit comments