diff --git a/.gitignore b/.gitignore index b7f6d083..2a5e2170 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,5 @@ wallet.sqlite3 .notes .*keys.db .*wallet.sqlite3 -.models.json +.*models.json compose.override.yml \ No newline at end of file diff --git a/router/proxy.py b/router/proxy.py index 84ae24b9..9b06125e 100644 --- a/router/proxy.py +++ b/router/proxy.py @@ -37,16 +37,14 @@ async def proxy( content="Invalid Key-Expiry-Time: must be a valid Unix timestamp", status_code=400, ) - else: - key_expiry_time = None - - if(key_expiry_time and not refund_address): - return Response( + if(not refund_address): + return Response( content=f"Error: Refund-LNURL header required when using Key-Expiry-Time", status_code=400, ) + else: + key_expiry_time = None - key = await validate_bearer_key(bearer_key, session, refund_address, key_expiry_time) # Pre-validate JSON for requests that require it