Rename webdo to dnsapi

Still need a better name
This commit is contained in:
Anders Pitman committed 2021-12-19 17:08:11 -07:00
1 parent 5db952a069
commit 49c467f85c
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -211,7 +211,7 @@ func Listen() {
timestamp := time.Now().Format(time.RFC3339)
srcIp := strings.Split(r.RemoteAddr, ":")[0]
fmt.Println(fmt.Sprintf("%s %s %s %s %s", timestamp, srcIp, r.Method, r.Host, r.URL.Path))
if r.URL.Path == "/webdo/requests" {
if r.URL.Path == "/dnsapi/requests" {
r.ParseForm()
requestId := r.Form.Get("request-id")
@@ -232,7 +232,7 @@ func Listen() {
w.Write(jsonBytes)
} else if r.URL.Path == "/webdo/callback" {
} else if r.URL.Path == "/dnsapi/callback" {
r.ParseForm()
requestId := r.Form.Get("request-id")
@@ -359,7 +359,7 @@ func getAdminDomain(ip string, certConfig *certmagic.Config) string {
requestId, _ := genRandomCode(32)
tnLink := fmt.Sprintf("https://takingnames.io/webdo?requester=%s&request-id=%s&request-type=%s", ip, requestId, "set-ip")
tnLink := fmt.Sprintf("https://takingnames.io/dnsapi?requester=%s&request-id=%s&request-type=%s", ip, requestId, "set-ip")
// Create a temporary web server to handle the callback which contains the domain
@@ -370,7 +370,7 @@ func getAdminDomain(ip string, certConfig *certmagic.Config) string {
Handler: mux,
}
mux.HandleFunc("/webdo/callback", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/dnsapi/callback", func(w http.ResponseWriter, r *http.Request) {
r.ParseForm()
domain := r.Form.Get("domain")
+1 -1
View File
@@ -178,7 +178,7 @@ func (h *WebUiHandler) handleWebUiRequest(w http.ResponseWriter, r *http.Request
h.db.SetDNSRequest(requestId, req)
tnLink := fmt.Sprintf("https://takingnames.io/webdo?requester=%s&request-id=%s", h.config.WebUiDomain, requestId)
tnLink := fmt.Sprintf("https://takingnames.io/dnsapi?requester=%s&request-id=%s", h.config.WebUiDomain, requestId)
templateData := struct {
Domain string