diff --git a/handlers/new.go b/handlers/new.go
index <HASH>..<HASH> 100644
--- a/handlers/new.go
+++ b/handlers/new.go
@@ -4,6 +4,7 @@ import (
 	"crypto/rand"
 	"encoding/hex"
 	"errors"
+	"flag"
 	"fmt"
 	"log"
 	"net/http"
@@ -13,6 +14,8 @@ import (
 	"github.com/coreos/go-etcd/etcd"
 )
 
+var baseURI = flag.String("host", "https://discovery.etcd.io", "base location for computed token URI")
+
 func generateCluster() string {
 	b := make([]byte, 16)
 	_, err := rand.Read(b)
@@ -78,5 +81,5 @@ func NewTokenHandler(w http.ResponseWriter, r *http.Request) {
 
 	log.Println("New cluster created", token)
 
-	fmt.Fprintf(w, "https://discovery.etcd.io/"+token)
+	fmt.Fprintf(w, "%s/%s", *baseURI, token)
 }
http: Allow configuration of the URI from /new

This patch adds a new flag, `--host`, which permits runtime
configuration of the URI returned by the `/new` handler. The default
behavior is the current hardcoded behavior, which always directs clients
to <URL>