Open
Description
I was randomly thinking about payment protocol over HTTP and realized it'd be nicer to require that the client sends X-Accept-Authenticate: LN-invoice header
(could be standardized to not require X-
in the future) This allows the server to know upfront that the client actually supports LN.
Advantages:
- The server can make conditional response and e.g. send CAPTCHA instead (if it's used as rate-limiting feature) or provide on-chain address for clients who wish to avoid LN and pay bigger amount upfront. (Or use fiat ๐คฎ )
- The server can avoid generating and storing the invoice if the endpoint was visited by accident. This is NOT meant as a protection against malicious actors attempting to DoS, just a small optimization/helper. Since various (spam, indexing...) bots today do not understand LN, it actually does serve as a spam protection temporarily.
Disadvantages:
- Slightly more complicated implementation
- Privacy implications if browsers unconditionally send the header while being minority. This can be mitigated by the server sending a header like
X-Supports-LN: example.com/*, *.example.com/*
, the browser could then offer the user to enable LN for that website.
Metadata
Metadata
Assignees
Labels
No labels