Skip to content

Conversation

@Roninbeks
Copy link

Add Custom Hostname API support

This PR implements support for Cloudflare's Custom Hostname API, enabling management of custom hostnames (also known as SSL for SaaS) within zones.

Motivation

We need this to manage custom hostnames for our customers and automate SSL certificate provisioning for custom domains in our product.

Features

Endpoint implementations:

  • List Custom Hostnames - Query, filter, sort, and paginate custom hostnames with support for filtering by hostname, SSL status, and ID
  • Create Custom Hostname - Add new custom hostnames with SSL certificate provisioning, including support for custom origins, SNI configuration, and metadata
  • Update Custom Hostname - Modify SSL configuration, origin server settings, and metadata for existing hostnames
  • Delete Custom Hostname - Remove custom hostnames and their associated SSL certificates

SSL Configuration Options:

  • Multiple validation methods (HTTP, TXT, Email)
  • Certificate authority selection (DigiCert, Google, Let's Encrypt)
  • Custom certificate support with CSR and private key options
  • Wildcard certificate support
  • Bundle method configuration (ubiquitous, optimal, force)
  • TLS settings (HTTP/2, HTTP/3, min TLS version, ciphers, early hints)

Additional Capabilities:

  • Custom origin server and SNI configuration
  • Flexible metadata storage for hostname tagging
  • Comprehensive status tracking for both hostnames and SSL certificates
  • Ownership verification support (DNS and HTTP methods)

Type Safety

All API request/response types are fully modeled with proper serialization/deserialization, including detailed enums for statuses, validation methods, and certificate authorities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants