Delete Custom Domain Edge Function
Handles the deletion of a custom domain from a container, including removal of the Caddy vhost configuration.
POST /delete_custom_domain
Required - JWT in Authorization header
Deletion process:
The Caddy removal is non-blocking - if it fails, the database record is still deleted to avoid orphaned records.
Tables touched:
External services:
{ "domain_id": "uuid" } Copy
{ "domain_id": "uuid" }
200 - Success with domain host
400 - Missing domain_id
401 - Missing authorization header
404 - Domain not found or access denied
500 - Database deletion failure
Fileoverview
Delete Custom Domain Edge Function
Handles the deletion of a custom domain from a container, including removal of the Caddy vhost configuration.
Endpoint
POST /delete_custom_domain
Auth
Required - JWT in Authorization header
Remarks
Deletion process:
The Caddy removal is non-blocking - if it fails, the database record is still deleted to avoid orphaned records.
Tables touched:
External services:
Example: Request body
Returns
200 - Success with domain host
Returns
400 - Missing domain_id
Returns
401 - Missing authorization header
Returns
404 - Domain not found or access denied
Returns
500 - Database deletion failure