Code Monkey home page Code Monkey logo

cloudflare's People

Contributors

aliask avatar mholt avatar stapelberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cloudflare's Issues

Invalid Request Headers

Does anyone know if this package has fallen out of date with cloudflare, trying to run with the recommended (scoped, Zone:Read, DNS:Edit) I get the following error:

unable to get TLS for "mx.catcher.mx.ax": mx.catcher.mx.ax: obtaining certificate: [mx.catcher.mx.ax] Obtain: [mx.catcher.mx.ax] solving challenges: presenting for challenge: adding temporary record for zone mx.ax.: got error status: HTTP 400: [{Code:6003 Message:Invalid request headers}] (order=https://acme-staging-v02.api.letsencrypt.org/acme/order/x/x) (ca=https://acme-staging-v02.api.letsencrypt.org/directory)

Unit Test cases missing?

I have read this wiki, I can't find test cases though it works. I'm trying to write another provider, but I don't know how to write test cases, how to write unit cases for third-part API. Is there any tips?

Code:6003 Message:Invalid request headers

I get the following error when trying to

func cloudFlare() {
	ctx := context.TODO()
	zone := "theprimestyle.com."

	// configure the DNS provider (choose any from github.com/libdns)
	provider := cloudflare.Provider{APIToken: CLOUDFLARE_API_TOKEN}

	// list records
	listr, err := provider.GetRecords(ctx, zone)
	fmt.Println(err)
	if err == nil {
		for i, rec := range listr {
			fmt.Println(i, rec.ID, rec.Name, rec.Type, rec.Value, rec.TTL, rec.Priority)
		}
	}
}

got error status: HTTP 400: [{Code:6003 Message:Invalid request headers}]

cloudflare.SetRecords: confusing behavior regarding record ID

Currently, the record’s ID must be empty for it to be updated:

cloudflare/provider.go

Lines 134 to 158 in 16482ae

if rec.ID == "" {
// the record might already exist, even if we don't know the ID yet
matches, err := p.getDNSRecords(ctx, zoneInfo, rec, false)
if err != nil {
return nil, err
}
if len(matches) > 0 {
for _, match := range matches {
// record exists; update it
result, err := p.updateRecord(ctx, match, cloudflareRecord(rec))
if err != nil {
return nil, err
}
results = append(results, result.libdnsRecord())
}
continue
}
}
// record doesn't exist; create it
result, err := p.createRecord(ctx, zoneInfo, rec)
if err != nil {
return nil, err
}
results = append(results, result.libdnsRecord())

This seems like the opposite of what one would want in that scenario: when passing in an ID, I would expect the record referenced by that ID to be updated.

Can you clarify if this is a logic bug, or intentional?

Using wrong zone name for sub sub domain

I'm having problems trying to get a wildcard cert for a sub sub domain e.g. *.sub.domain.com.
This is the error i get:
[*.sub.domain.com] solving challenges: presenting for challenge: adding temporary record for zone \"sub.domain.com.\": expected 1 zone, got 0 for sub.domain.com.
I think the problem is that my zone is called domain.com but it tries to find sub.domain.com which doesnt exist.
Maybe I'm wrong but if not, could you please add an option for setting a custom zone that will be used?

PS: I'm using the caddy cloudflare plugin: https://github.com/caddy-dns/cloudflare but from what I can tell from reading their code this is a problem with this lib.

Seperate tokens for list/edit

The way this module is written I have to create one token that covers list and edit for all zones

go-acme lets me create a list for all zones and an edit just for the zone I'm interested in, this is a somewhat more secure method.

Cannot create SRV records

I am trying to create an SRV Record, e.g. _imap._tcp.example.org. 60 IN SRV 10 10 143 example.org..

As there is no real support for it in the libdns package, I tried to set the value to 10 10 143 example.org (both with dot suffix and without) but always get got error status: HTTP 400: [{Code:1004 Message:DNS Validation Error}].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.