mirror of
https://github.com/lnbits/lnbits.git
synced 2025-06-28 09:40:59 +02:00
Allow more than 2-nd level domain in incoming ln-addresses (#914)
This commit is contained in:
parent
fc1a87f617
commit
193d037ad6
@ -476,7 +476,7 @@ async def api_lnurlscan(code: str, wallet: WalletTypeInfo = Depends(get_key_type
|
|||||||
except:
|
except:
|
||||||
# parse internet identifier (user@domain.com)
|
# parse internet identifier (user@domain.com)
|
||||||
name_domain = code.split("@")
|
name_domain = code.split("@")
|
||||||
if len(name_domain) == 2 and len(name_domain[1].split(".")) == 2:
|
if len(name_domain) == 2 and len(name_domain[1].split(".")) >= 2:
|
||||||
name, domain = name_domain
|
name, domain = name_domain
|
||||||
url = (
|
url = (
|
||||||
("http://" if domain.endswith(".onion") else "https://")
|
("http://" if domain.endswith(".onion") else "https://")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user