Browse Source

go fmt

master 1.5.1
bumi 2 months ago
parent
commit
ae9f643fbf
  1. 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…
Cancel
Save