{"action":"created","comment":{"url":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/comments/102274061","pull_request_review_id":23023165,"id":102274061,"diff_hunk":"@@ -0,0 +1,248 @@\n++++\n+date = \"2017-02-20T20:46:48Z\"\n+slug = \"How to add middleware to CoreDNS; a tutorial\"\n+tags = [\"middleware\", \"howto\", \"tutorial\"]\n+title = \"How to Add Middleware to CoreDNS\"\n++++\n+\n+CoreDNS is a DNS server that chains middleware. Middleware is defined as a method `ServeDNS()` that\n+gets a request and either responds to the client or passes it on to the next middleware. If none of\n+the middlewares handle the request a default response of SERVFAIL is returned.\n+\n+This blog post details how to add middleware to CoreDNS. We're using the example of the *whoami*\n+middleware which is a CoreDNS middleware and loaded by default if nothing is specified.\n+\n+> Note all the code examples here are in Go because CoreDNS is written in the Go language.\n+\n+First question should be: \"What should my middleware do?\". In the case of the *whoami* middleware\n+its purpose is to echo back the client's IP (IPv4 or IPv6), the transport used (\"tcp\" or \"udp\") and\n+the request port number.\n+\n+Next question is: \"What is the name of this new middleware?\" Try to find a short, descriptive name\n+for this. In case this, we already had a (good) name: *whoami*.\n+\n+## Middleware\n+\n+A middleware consists out of an number of parts:\n+\n+1. The registration of the middelware\n+2. The setup function that parses the *whois* directive and\n+    possible option from the Corefile\n+3. The `serveDNS()` and `Name()` methods\n+4. Hooking it up\n+5. Using it\n+\n+# 1. Registration\n+\n+Typically a middleware has a file called `setup.go` that handles the registration.\n+In there, the `init` function should look like:\n+\n+~~~ go\n+func init() {\n+\tcaddy.RegisterPlugin(\"whoami\", caddy.Plugin{\n+\t\tServerType: \"dns\",\n+\t\tAction:     setupWhoami,\n+\t})\n+}\n+~~~\n+First you see that we're using `caddy.RegisterPlugin` which makes perfectly sense, because\n+CoreDNS uses the [Caddy](https://caddyserver.com) server framework. The first argument is the name\n+of the directive as used in the Corefile.\n+\n+The `ServerType` is \"dns\" because CoreDNS is of that servertype. The `Action` is the name of the\n+setup function that takes care of the parsing of the Corefile. Its job is to return a type that\n+implements the `middleware.Handler` interface.\n+\n+So whenever the Corefile parser sees \"whoami\", `setupWhoami` is called.\n+\n+# 2. Setup function\n+\n+Because the *whoami* directive does not allow for any options, the setup function is relatively\n+simple:\n+~~~ go\n+func setupWhoami(c *caddy.Controller) error {\n+\tc.Next() // 'whoami'\n+\tif c.NextArg() {\n+\t\treturn middleware.Error(\"whoami\", c.ArgErr())\n+\t}\n+\n+\tdnsserver.GetConfig(c).AddMiddleware(func(next middleware.Handler) middleware.Handler {\n+\t\treturn Whoami{}\n+\t})\n+\n+\treturn nil\n+}\n+~~~\n+We use the `*caddy.Controller` to receive tokens from the Corefile and act upon them. Here we only\n+check if there is nothing specified after the token `whoami`. If you need to do more there are\n+`c.Val()`, `c.Args()` and [friends](https://godoc.org/github.com/mholt/caddy/caddyfile#Dispenser).\n+\n+The full `setup.go` for *whoami* is [here](https://github.com/miekg/coredns/blob/master/middleware/whoami/setup.go).\n+\n+Note that you should test the parsing as well, see\n+[setup_test.go](https://github.com/miekg/coredns/blob/master/middleware/whoami/setup_test.go).\n+\n+# 3. ServeDNS() and Name()\n+\n+Let's start with the trivial `Name()` method which is used (mainly) to see if the metrics\n+middleware is loaded. CoreDNS does by this by name. The method just returns the string `whoami`.\n+\n+~~~ go\n+// Name implements the Handler interface.\n+func (wh Whoami) Name() string { return \"whoami\" }\n+~~~\n+\n+Next, the meat of the whole thing, the `ServeDNS` method. We will look at this method line by line.\n+\n+~~~\n+// ServeDNS implements the middleware.Handler interface.\n+func (wh Whoami) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {\n+\tstate := request.Request{W: w, Req: r}\n+~~~\n+As seen the function gets a couple of parameters of which `w` is the client side: writing to `w`\n+returns a response to the client. As you will see below all interesting properties of the client\n+connection can be retrieved from the\n+[dns.ResponseWriter](https://godoc.org/github.com/miekg/dns#ResponseWriter). `r` is the incoming\n+query. The `ServeDNS` returns a integer and/or an error. The values the integer can take are\n+the DNS RCODEs, dns.ServerFailure, dns.NotImplemented, dns.Success, etc. etc. A successful return\n+value indicates the middleware has written to the client.\n+\n+`request.Request` is a helper struct that abstracts and cache some client-side properties, like\n+EDNS0 records and the DNSSEC OK bit.\n+\n+Next we setup the reply message:\n+~~~ go\n+a := new(dns.Msg)\n+a.SetReply(r)\n+a.Compress = true\n+a.Authoritative = true\n+~~~\n+\n+We create a new message and copy the relevant bits from the incoming reply to the one we're planning\n+to return. We fiddle with some message bits and turn on message compression.\n+\n+Then we are going to inspect the incoming message via the `state` helper struct to see what we\n+should return.\n+\n+~~~ go\n+ip := state.IP()\n+var rr dns.RR\n+\n+switch state.Family() {\n+case 1:\n+    rr = new(dns.A)\n+    rr.(*dns.A).Hdr = dns.RR_Header{Name: state.QName(),\n+            Rrtype: dns.TypeA, Class: state.QClass()}\n+    rr.(*dns.A).A = net.ParseIP(ip).To4()\n+case 2:\n+    rr = new(dns.AAAA)\n+    rr.(*dns.AAAA).Hdr = dns.RR_Header{Name: state.QName(),\n+            Rrtype: dns.TypeAAAA, Class: state.QClass()}\n+    rr.(*dns.AAAA).AAAA = net.ParseIP(ip)\n+}\n+~~~\n+`IP()` returns the IP address of the client. `Family()` returns the transport used. Depending on the\n+family we either create a A or AAAA record with the client's address. Note we don't specify a TTL\n+meaning it will be zero; indicating these records should not be cached.\n+\n+Next we want to encode the client's source port and transport protocol used.\n+~~~go\n+srv := new(dns.SRV)\n+srv.Hdr = dns.RR_Header{Name: \"_\" + state.Proto() + \".\" + state.QName(),\n+            Rrtype: dns.TypeSRV, Class: state.QClass()}\n+port, _ := strconv.Atoi(state.Port())\n+srv.Port = uint16(port)\n+srv.Target = \".\"\n+~~~\n+\n+SRV records are ideal for that. The domain names are either prefixed with `_tcp` or `_udp`, and the\n+SRV record's port number re-used to echo back the clients's port number, meaning we create\n+something like this: `_tcp.example.org.\t0\tIN\tSRV\t0 0 <portNr>`.\n+\n+In the last bit of this method we create the full message and send it:\n+\n+~~~go\n+a.Extra = []dns.RR{rr, srv}\n+\n+state.SizeAndDo(a)\n+w.WriteMsg(a)\n+\n+return 0, nil\n+~~~\n+\n+First we add the two created resource records (`rr` and `srv`) to the additional section of the\n+answer message: `a.Extra`.\n+Then we call `state.SizeOnDo(a)` which will set the correct EDNS0 record on the message and handle\n+setting the truncation bit). Then,\n+finally, we call the `WriteMsg` method on `w` which writes the message back to the client.\n+We indicate a successful (even though it might have failed - we didn't check the return value of\n+`WriteMsg`) write be returning 0 and `nil`.\n+\n+# 4. Hooking it up\n+\n+Next we need to tell CoreDNS to compile and use this new middleware. Adding a middleware was\n+recently simplified and only consists out of editing `middleware.cfg` and adding the line:\n+\n+~~~\n+210:whoami:whoami\n+~~~\n+The initial number is used for sorting the middlware (more on that below), then the name of the\n+plugin as used in the registration and then the package inside the CoreDNS middleware directory.\n+\n+Each middleware has a place in the list of all other middlewares. For instance the caching\n+or the metrics middleware needs to come early, so that it can \"see\" the query and\n+response and do cachy or metricsy things with it. A *whoami* middleware is not that special and can\n+be placed relatively late in the list (hence the high number).\n+\n+Now do a `go gen && go build` to get a `coredns` binary that can be used with our shiny new middleware.\n+This binary should include `dns.whoami` when called with `-plugins`.\n+\n+# 5. Using it\n+\n+Write a Corefile:\n+\n+~~~ txt\n+. {\n+    whoami\n+}\n+~~~\n+In words this says: be authortitative for the root `.` and below, meaning all posible queries will","path":"content/post/how-to-add-middleware.md","position":209,"original_position":209,"commit_id":"62698801421a8cfa4eb706ae4137f81c0c5b2fa3","original_commit_id":"62698801421a8cfa4eb706ae4137f81c0c5b2fa3","user":{"login":"johnbelamaric","id":9468083,"avatar_url":"https://avatars.githubusercontent.com/u/9468083?v=3","gravatar_id":"","url":"https://api.github.com/users/johnbelamaric","html_url":"https://github.com/johnbelamaric","followers_url":"https://api.github.com/users/johnbelamaric/followers","following_url":"https://api.github.com/users/johnbelamaric/following{/other_user}","gists_url":"https://api.github.com/users/johnbelamaric/gists{/gist_id}","starred_url":"https://api.github.com/users/johnbelamaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnbelamaric/subscriptions","organizations_url":"https://api.github.com/users/johnbelamaric/orgs","repos_url":"https://api.github.com/users/johnbelamaric/repos","events_url":"https://api.github.com/users/johnbelamaric/events{/privacy}","received_events_url":"https://api.github.com/users/johnbelamaric/received_events","type":"User","site_admin":false},"body":"s/posible/possible/","created_at":"2017-02-21T17:57:55Z","updated_at":"2017-02-21T17:59:07Z","html_url":"https://github.com/miekg/blog.coredns.io/pull/1#discussion_r102274061","pull_request_url":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/comments/102274061"},"html":{"href":"https://github.com/miekg/blog.coredns.io/pull/1#discussion_r102274061"},"pull_request":{"href":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/1","id":107074217,"html_url":"https://github.com/miekg/blog.coredns.io/pull/1","diff_url":"https://github.com/miekg/blog.coredns.io/pull/1.diff","patch_url":"https://github.com/miekg/blog.coredns.io/pull/1.patch","issue_url":"https://api.github.com/repos/miekg/blog.coredns.io/issues/1","number":1,"state":"open","locked":false,"title":"add blog: how to add middleware","user":{"login":"miekg","id":353371,"avatar_url":"https://avatars.githubusercontent.com/u/353371?v=3","gravatar_id":"","url":"https://api.github.com/users/miekg","html_url":"https://github.com/miekg","followers_url":"https://api.github.com/users/miekg/followers","following_url":"https://api.github.com/users/miekg/following{/other_user}","gists_url":"https://api.github.com/users/miekg/gists{/gist_id}","starred_url":"https://api.github.com/users/miekg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miekg/subscriptions","organizations_url":"https://api.github.com/users/miekg/orgs","repos_url":"https://api.github.com/users/miekg/repos","events_url":"https://api.github.com/users/miekg/events{/privacy}","received_events_url":"https://api.github.com/users/miekg/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-20T20:48:38Z","updated_at":"2017-02-21T17:59:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8b872dd2bdb09d19b5f557fc5e0240c7aa4a0de","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/1/commits","review_comments_url":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/1/comments","review_comment_url":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/miekg/blog.coredns.io/issues/1/comments","statuses_url":"https://api.github.com/repos/miekg/blog.coredns.io/statuses/62698801421a8cfa4eb706ae4137f81c0c5b2fa3","head":{"label":"miekg:how-to-add","ref":"how-to-add","sha":"62698801421a8cfa4eb706ae4137f81c0c5b2fa3","user":{"login":"miekg","id":353371,"avatar_url":"https://avatars.githubusercontent.com/u/353371?v=3","gravatar_id":"","url":"https://api.github.com/users/miekg","html_url":"https://github.com/miekg","followers_url":"https://api.github.com/users/miekg/followers","following_url":"https://api.github.com/users/miekg/following{/other_user}","gists_url":"https://api.github.com/users/miekg/gists{/gist_id}","starred_url":"https://api.github.com/users/miekg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miekg/subscriptions","organizations_url":"https://api.github.com/users/miekg/orgs","repos_url":"https://api.github.com/users/miekg/repos","events_url":"https://api.github.com/users/miekg/events{/privacy}","received_events_url":"https://api.github.com/users/miekg/received_events","type":"User","site_admin":false},"repo":{"id":68516113,"name":"blog.coredns.io","full_name":"miekg/blog.coredns.io","owner":{"login":"miekg","id":353371,"avatar_url":"https://avatars.githubusercontent.com/u/353371?v=3","gravatar_id":"","url":"https://api.github.com/users/miekg","html_url":"https://github.com/miekg","followers_url":"https://api.github.com/users/miekg/followers","following_url":"https://api.github.com/users/miekg/following{/other_user}","gists_url":"https://api.github.com/users/miekg/gists{/gist_id}","starred_url":"https://api.github.com/users/miekg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miekg/subscriptions","organizations_url":"https://api.github.com/users/miekg/orgs","repos_url":"https://api.github.com/users/miekg/repos","events_url":"https://api.github.com/users/miekg/events{/privacy}","received_events_url":"https://api.github.com/users/miekg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miekg/blog.coredns.io","description":"CoreDNS Blog","fork":false,"url":"https://api.github.com/repos/miekg/blog.coredns.io","forks_url":"https://api.github.com/repos/miekg/blog.coredns.io/forks","keys_url":"https://api.github.com/repos/miekg/blog.coredns.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miekg/blog.coredns.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miekg/blog.coredns.io/teams","hooks_url":"https://api.github.com/repos/miekg/blog.coredns.io/hooks","issue_events_url":"https://api.github.com/repos/miekg/blog.coredns.io/issues/events{/number}","events_url":"https://api.github.com/repos/miekg/blog.coredns.io/events","assignees_url":"https://api.github.com/repos/miekg/blog.coredns.io/assignees{/user}","branches_url":"https://api.github.com/repos/miekg/blog.coredns.io/branches{/branch}","tags_url":"https://api.github.com/repos/miekg/blog.coredns.io/tags","blobs_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miekg/blog.coredns.io/statuses/{sha}","languages_url":"https://api.github.com/repos/miekg/blog.coredns.io/languages","stargazers_url":"https://api.github.com/repos/miekg/blog.coredns.io/stargazers","contributors_url":"https://api.github.com/repos/miekg/blog.coredns.io/contributors","subscribers_url":"https://api.github.com/repos/miekg/blog.coredns.io/subscribers","subscription_url":"https://api.github.com/repos/miekg/blog.coredns.io/subscription","commits_url":"https://api.github.com/repos/miekg/blog.coredns.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/miekg/blog.coredns.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/miekg/blog.coredns.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/miekg/blog.coredns.io/contents/{+path}","compare_url":"https://api.github.com/repos/miekg/blog.coredns.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miekg/blog.coredns.io/merges","archive_url":"https://api.github.com/repos/miekg/blog.coredns.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miekg/blog.coredns.io/downloads","issues_url":"https://api.github.com/repos/miekg/blog.coredns.io/issues{/number}","pulls_url":"https://api.github.com/repos/miekg/blog.coredns.io/pulls{/number}","milestones_url":"https://api.github.com/repos/miekg/blog.coredns.io/milestones{/number}","notifications_url":"https://api.github.com/repos/miekg/blog.coredns.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miekg/blog.coredns.io/labels{/name}","releases_url":"https://api.github.com/repos/miekg/blog.coredns.io/releases{/id}","deployments_url":"https://api.github.com/repos/miekg/blog.coredns.io/deployments","created_at":"2016-09-18T11:05:43Z","updated_at":"2016-09-18T12:37:36Z","pushed_at":"2017-02-20T20:48:38Z","git_url":"git://github.com/miekg/blog.coredns.io.git","ssh_url":"git@github.com:miekg/blog.coredns.io.git","clone_url":"https://github.com/miekg/blog.coredns.io.git","svn_url":"https://github.com/miekg/blog.coredns.io","homepage":null,"size":576,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"miekg:master","ref":"master","sha":"9bb695071baad24882669f7011a9deb559c7b753","user":{"login":"miekg","id":353371,"avatar_url":"https://avatars.githubusercontent.com/u/353371?v=3","gravatar_id":"","url":"https://api.github.com/users/miekg","html_url":"https://github.com/miekg","followers_url":"https://api.github.com/users/miekg/followers","following_url":"https://api.github.com/users/miekg/following{/other_user}","gists_url":"https://api.github.com/users/miekg/gists{/gist_id}","starred_url":"https://api.github.com/users/miekg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miekg/subscriptions","organizations_url":"https://api.github.com/users/miekg/orgs","repos_url":"https://api.github.com/users/miekg/repos","events_url":"https://api.github.com/users/miekg/events{/privacy}","received_events_url":"https://api.github.com/users/miekg/received_events","type":"User","site_admin":false},"repo":{"id":68516113,"name":"blog.coredns.io","full_name":"miekg/blog.coredns.io","owner":{"login":"miekg","id":353371,"avatar_url":"https://avatars.githubusercontent.com/u/353371?v=3","gravatar_id":"","url":"https://api.github.com/users/miekg","html_url":"https://github.com/miekg","followers_url":"https://api.github.com/users/miekg/followers","following_url":"https://api.github.com/users/miekg/following{/other_user}","gists_url":"https://api.github.com/users/miekg/gists{/gist_id}","starred_url":"https://api.github.com/users/miekg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miekg/subscriptions","organizations_url":"https://api.github.com/users/miekg/orgs","repos_url":"https://api.github.com/users/miekg/repos","events_url":"https://api.github.com/users/miekg/events{/privacy}","received_events_url":"https://api.github.com/users/miekg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miekg/blog.coredns.io","description":"CoreDNS Blog","fork":false,"url":"https://api.github.com/repos/miekg/blog.coredns.io","forks_url":"https://api.github.com/repos/miekg/blog.coredns.io/forks","keys_url":"https://api.github.com/repos/miekg/blog.coredns.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miekg/blog.coredns.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miekg/blog.coredns.io/teams","hooks_url":"https://api.github.com/repos/miekg/blog.coredns.io/hooks","issue_events_url":"https://api.github.com/repos/miekg/blog.coredns.io/issues/events{/number}","events_url":"https://api.github.com/repos/miekg/blog.coredns.io/events","assignees_url":"https://api.github.com/repos/miekg/blog.coredns.io/assignees{/user}","branches_url":"https://api.github.com/repos/miekg/blog.coredns.io/branches{/branch}","tags_url":"https://api.github.com/repos/miekg/blog.coredns.io/tags","blobs_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miekg/blog.coredns.io/statuses/{sha}","languages_url":"https://api.github.com/repos/miekg/blog.coredns.io/languages","stargazers_url":"https://api.github.com/repos/miekg/blog.coredns.io/stargazers","contributors_url":"https://api.github.com/repos/miekg/blog.coredns.io/contributors","subscribers_url":"https://api.github.com/repos/miekg/blog.coredns.io/subscribers","subscription_url":"https://api.github.com/repos/miekg/blog.coredns.io/subscription","commits_url":"https://api.github.com/repos/miekg/blog.coredns.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/miekg/blog.coredns.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/miekg/blog.coredns.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/miekg/blog.coredns.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/miekg/blog.coredns.io/contents/{+path}","compare_url":"https://api.github.com/repos/miekg/blog.coredns.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miekg/blog.coredns.io/merges","archive_url":"https://api.github.com/repos/miekg/blog.coredns.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miekg/blog.coredns.io/downloads","issues_url":"https://api.github.com/repos/miekg/blog.coredns.io/issues{/number}","pulls_url":"https://api.github.com/repos/miekg/blog.coredns.io/pulls{/number}","milestones_url":"https://api.github.com/repos/miekg/blog.coredns.io/milestones{/number}","notifications_url":"https://api.github.com/repos/miekg/blog.coredns.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miekg/blog.coredns.io/labels{/name}","releases_url":"https://api.github.com/repos/miekg/blog.coredns.io/releases{/id}","deployments_url":"https://api.github.com/repos/miekg/blog.coredns.io/deployments","created_at":"2016-09-18T11:05:43Z","updated_at":"2016-09-18T12:37:36Z","pushed_at":"2017-02-20T20:48:38Z","git_url":"git://github.com/miekg/blog.coredns.io.git","ssh_url":"git@github.com:miekg/blog.coredns.io.git","clone_url":"https://github.com/miekg/blog.coredns.io.git","svn_url":"https://github.com/miekg/blog.coredns.io","homepage":null,"size":576,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/1"},"html":{"href":"https://github.com/miekg/blog.coredns.io/pull/1"},"issue":{"href":"https://api.github.com/repos/miekg/blog.coredns.io/issues/1"},"comments":{"href":"https://api.github.com/repos/miekg/blog.coredns.io/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/miekg/blog.coredns.io/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/miekg/blog.coredns.io/statuses/62698801421a8cfa4eb706ae4137f81c0c5b2fa3"}}}}
{"actor":{"display_login":"johnbelamaric"}}