Wrong host for subrouter

This commit is contained in:
Travis
2013-01-25 17:39:59 -08:00
parent 43161d12d4
commit d4c3da08c9
2 changed files with 2 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ response = rest.post(
# "http://localhost:8080/",
"http://router.irondns.info/1/#{project_id}/register",
headers: {"Iron-Router"=>"register", "Content-Type"=>"application/json",
"Authorization"=>"OAuth #{token}"},
"Authorization"=>"OAuth #{token}ssss"},
body: {"host"=>host_name, "code"=>code_name}
)
puts "response body:"

View File

@@ -105,7 +105,7 @@ func main() {
r := mux.NewRouter()
// s := r.Headers("Iron-Router", "").Subrouter()
s := r.Host("router.iron.io").Subrouter()
s := r.Host("router.irondns.info").Subrouter()
s.Handle("/1/projects/{project_id:[0-9a-fA-F]{24}}/register", &common.AuthHandler{&WorkerHandler{}, ironAuth})
s.HandleFunc("/ping", Ping)
s.HandleFunc("/addworker", &WorkerHandler{})