Improve CORS origin handling; extend invoice repo/service and payments dispatch; rate limit and nginx config updates

Made-with: Love
This commit is contained in:
2026-04-29 05:44:59 +00:00
parent 2cb17df4c5
commit a01797e9b2
12 changed files with 224 additions and 35 deletions

View File

@@ -112,6 +112,11 @@ paths:
post:
tags: [User]
summary: Create payment invoice
description: |
Creates a new Lightning invoice. If this pubkey already has an unpaid, unexpired invoice
for the same subscription_type (and same years when yearly), that invoice is returned
(idempotent resume). If an unpaid invoice exists for a different plan, it is discarded and
a new invoice is created for the requested plan.
requestBody:
required: true
content:
@@ -140,7 +145,7 @@ paths:
schema: { $ref: '#/components/schemas/Invoice' }
'400': { description: Validation error, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } }
'403': { description: Forbidden — user already has lifetime access, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } }
'409': { description: Conflict — username unavailable or pending invoice already exists, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } }
'409': { description: Conflict — username unavailable, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } }
'503': { description: Lightning unavailable, content: { application/json: { schema: { $ref: '#/components/schemas/Error' } } } }
/v1/invoices/{payment_hash}:
get: