feat: add custom domain support with SSL, DNS verification, and billing
Users can assign a custom domain to their app with automatic SSL via cert-manager. Includes DNS verification flow (CNAME check), Persian instructions, admin-configurable pricing via PlatformSetting, and integration into the deploy wizard cost calculation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -95,6 +95,24 @@ export class BillingController {
|
||||
return this.billingService.calculateCost(dto);
|
||||
}
|
||||
|
||||
// ─── Custom Domain Pricing ─────────────────────────────────────
|
||||
|
||||
@Get('settings/custom-domain-price')
|
||||
@ApiOperation({ summary: 'Get custom domain monthly price' })
|
||||
async getCustomDomainPrice() {
|
||||
return this.billingService.getCustomDomainPrice();
|
||||
}
|
||||
|
||||
@Patch('settings/custom-domain-price')
|
||||
@Roles(UserRole.ADMIN)
|
||||
@ApiOperation({ summary: 'Set custom domain monthly price (Admin)' })
|
||||
async setCustomDomainPrice(@Body() body: { monthlyPrice: number }) {
|
||||
if (body.monthlyPrice === undefined || body.monthlyPrice < 0) {
|
||||
throw new BadRequestException('monthlyPrice must be a non-negative number');
|
||||
}
|
||||
return this.billingService.setCustomDomainPrice(body.monthlyPrice);
|
||||
}
|
||||
|
||||
// ─── Wallet (User) ───────────────────────────────────────────────
|
||||
|
||||
@Get('wallet')
|
||||
|
||||
Reference in New Issue
Block a user