Skip to content

Support setting fallback origin on a zone#337

Merged
patryk merged 2 commits intocloudflare:masterfrom
Evesy:master
Aug 22, 2019
Merged

Support setting fallback origin on a zone#337
patryk merged 2 commits intocloudflare:masterfrom
Evesy:master

Conversation

@Evesy
Copy link
Copy Markdown

@Evesy Evesy commented Aug 19, 2019

Supports getting/setting the fallback_origin on Cloudflare Zones

Description

As part of Cloudflare's SSL for SaaS offering, a default origin server (fallback_origin) can be configured on any enabled zones.

Ultimately I'd like to be able to set this configuration option via a Terraform resource however I'm unable to do so until the Go client supports this endpoint.

The API endpoint is undocumented in the API docs but details can be found here

Has your change been tested?

  • Automated tests added
  • Manually tested getting the fallback origin for a zone (api.FallbackOrigin("<ZONEID>")) & updating the fallback origin for a zone (api.UpdateFallbackOrigin("<ZONEID>", newOrigin))

Screenshots (if appropriate):

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Comment thread zone.go Outdated
Comment thread zone.go
Comment thread zone.go
Copy link
Copy Markdown
Contributor

@jacobbednarz jacobbednarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@patryk
Copy link
Copy Markdown

patryk commented Aug 22, 2019

Looks good, thanks @Evesy !

@patryk patryk merged commit 658ea0b into cloudflare:master Aug 22, 2019
Michael9127 pushed a commit to Michael9127/cloudflare-go that referenced this pull request Oct 28, 2019
* Support setting fallback origin on a zone
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.

3 participants