Skip to content

fix(lightning): add X-Forwarded-Proto header to LNBits API calls#3890

Merged
davidleomay merged 2 commits into
developfrom
fix/lnbits-forwarded-proto
Jun 15, 2026
Merged

fix(lightning): add X-Forwarded-Proto header to LNBits API calls#3890
davidleomay merged 2 commits into
developfrom
fix/lnbits-forwarded-proto

Conversation

@davidleomay

Copy link
Copy Markdown
Member

Problem

After DFX API migration from Azure to dfxdev, LNURL-pay links return HTTP 426 ("LNURLs need to be delivered over a publicly accessible https domain").

On Azure, nginx terminated TLS in front of LNBits and added X-Forwarded-Proto: https automatically. On dfxdev, dfx-api calls LNBits directly over the Docker network without this header.

Fix

Add X-Forwarded-Proto: https header to all LNBits API calls in httpLnBitsConfig().

Testing

  • Build and deploy to dfxdev
  • Test an LNURL-pay link: GET https://dev.api.dfx.swiss/lnurlp/<linkId> — should return 200 with LNURL metadata instead of 426

LNBits requires HTTPS for LNURL endpoints and returns 426 when called
over plain HTTP. On Azure, nginx added this header automatically. After
migration to dfxdev, dfx-api calls LNBits directly without the header.
LNBits requires HTTPS for LNURL endpoints and returns 426 when called
over plain HTTP. On Azure, nginx added this header automatically. After
migration to dfxdev, dfx-api calls LNBits directly without the header.
@davidleomay davidleomay merged commit 12c79de into develop Jun 15, 2026
7 checks passed
@davidleomay davidleomay deleted the fix/lnbits-forwarded-proto branch June 15, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant