Skip to content

custom_origin_server field missing in v6 SDK #4204

@aeneasr

Description

@aeneasr

Confirm this is a Go library issue and not an underlying Cloudflare API issue

  • This is an issue with the Go library

Describe the bug

The custom_origin_server field, which was added to CustomHostname in [PR #316](#316), is no longer available in the v6 branch of the Cloudflare Go SDK.

This regression removes functionality that was previously merged and used for Enterprise “SSL for SaaS” integrations. The field is still part of the [public SSL for SaaS documentation](https://developers.cloudflare.com/ssl/ssl-for-saas/hostname-specific/hostname-specific/), and enterprise users rely on it for configuring hostname-specific origin servers.

Expected behavior

The CustomHostname struct should include the custom_origin_server field as in v1–v5 releases.

Actual behavior

In the v6 SDK, the field is missing from the struct definition, preventing users from setting or reading the custom origin server.

Steps to reproduce

  1. Use the latest v6 branch of cloudflare-go.
  2. Attempt to set or read CustomHostname.CustomOriginServer.
  3. Observe compilation failure or missing field.

Impact

  • Enterprise users cannot automate creation of hostnames with a custom origin server.
  • Breaks backward compatibility for existing integrations using the field.
  • Prevents feature parity with the Cloudflare Admin UI and SSL for SaaS API behavior.

Proposed resolution

Reintroduce CustomHostname.CustomOriginServer in v6, consistent with the behavior from PR #316.
If the omission was intentional, please clarify how enterprise customers should now configure custom origin servers through the API.

References

Code snippets

resp, err := c.CustomHostnames.New(ctx, custom_hostnames.CustomHostnameNewParams{
		ZoneID:   cloudflare.F(s.zone),
		Hostname: cloudflare.F(hostname),
		// custom_hostname_origin missing here

OS

macOS

Go version

Go 1.25.0

Library version

v6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions