Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
bumi committed May 7, 2022
1 parent 5fd10bc commit ae9f643
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lnme.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "\"]]"
Expand Down

0 comments on commit ae9f643

Please sign in to comment.