Add opt-in custom domains with automatic SSL
Deploy Ladill Merchant / deploy (push) Successful in 29s
Deploy Ladill Merchant / deploy (push) Successful in 29s
Customers can connect their own domain to a merchant page (storefront/event): add a domain, point an A record (apex + www) to the app server, click Verify — DNS is checked, then Ladill Domains' central SSL service issues + installs the Let's Encrypt cert and calls back to flip it live. The custom domain then serves the mapped page (host resolution on /). Feature-gated: only active when a Domains SSL API key is set, so this deploy is inert until wired. - custom_domains table + CustomDomain model - CustomDomainService (DNS verify, request cert), DomainsSslClient, DnsResolver - settings UI panel, signed SSL callback receiver, host resolution on / - feature tests (DNS verify/fail, signed callback, ownership) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
a4974098ee
commit
b2aede5963
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('custom_domains', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('qr_code_id')->constrained('qr_codes')->cascadeOnDelete(); // the storefront
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('host')->unique();
|
||||
$table->boolean('include_www')->default(true);
|
||||
$table->string('status', 16)->default('pending'); // pending | active | failed
|
||||
$table->string('ssl_status', 16)->default('pending'); // pending | active | failed
|
||||
$table->timestamp('dns_verified_at')->nullable();
|
||||
$table->timestamp('ssl_issued_at')->nullable();
|
||||
$table->timestamp('ssl_expires_at')->nullable();
|
||||
$table->text('last_error')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index('qr_code_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('custom_domains');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user