mirror of https://github.com/bumi/lntip
go fmt
This commit is contained in:
parent
5fd10bc647
commit
ae9f643fbf
10
lnme.go
10
lnme.go
|
@ -152,14 +152,14 @@ func main() {
|
|||
if !cfg.Bool("disable-ln-address") {
|
||||
lnurlHandler := func(c echo.Context) error {
|
||||
host := c.Request().Host
|
||||
proto := c.Scheme()
|
||||
// TODO: support RFC7239 Forwarded header
|
||||
proto := c.Scheme()
|
||||
// TODO: support RFC7239 Forwarded header
|
||||
if c.Request().Header.Get("X-Forwarded-Host") != "" {
|
||||
host = c.Request().Header.Get("X-Forwarded-Host")
|
||||
}
|
||||
if c.Request().Header.Get("X-Forwarded-Proto") != "" {
|
||||
proto = c.Request().Header.Get("X-Forwarded-Proto")
|
||||
}
|
||||
if c.Request().Header.Get("X-Forwarded-Proto") != "" {
|
||||
proto = c.Request().Header.Get("X-Forwarded-Proto")
|
||||
}
|
||||
name := c.Param("name")
|
||||
lightningAddress := name + "@" + host
|
||||
lnurlMetadata := "[[\"text/identifier\", \"" + lightningAddress + "\"], [\"text/plain\", \"Sats for " + lightningAddress + "\"]]"
|
||||
|
|
Loading…
Reference in New Issue