Nicer LNURLp URLs
this also registers a shorter lnurlp that can be used additionally to the lightning address
This commit is contained in:
1 parent
3b7ac31615
commit
9ae6153d47
1 file changed
+4
-2
@@ -144,7 +144,7 @@ func main() {
|
||||
})
|
||||
|
||||
if !cfg.Bool("disable-ln-address") {
|
||||
e.GET("/.well-known/lnurlp/:name", func(c echo.Context) error {
|
||||
lnurlHandler := func(c echo.Context) error {
|
||||
name := c.Param("name")
|
||||
lightningAddress := name + "@" + c.Request().Host
|
||||
lnurlMetadata := "[[\"text/identifier\", \"" + lightningAddress + "\"], [\"text/plain\", \"Sats for " + lightningAddress + "\"]]"
|
||||
@@ -183,7 +183,9 @@ func main() {
|
||||
}
|
||||
return c.JSON(http.StatusOK, lnurlPayResponse2)
|
||||
}
|
||||
})
|
||||
}
|
||||
e.GET("/.well-known/lnurlp/:name", lnurlHandler)
|
||||
e.GET("/lnurlp/:name", lnurlHandler)
|
||||
}
|
||||
|
||||
// Debug test endpoint
|
||||
|
||||
Reference in new issue
Block a user