Skip to content

Commit 4b6c187

Browse files
committed
debug enrollment in remote test
1 parent 21bd2c0 commit 4b6c187

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

http_handlers.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"math/big"
1414
"net/http"
1515
"net/url"
16+
"os"
1617
"strconv"
1718
"strings"
1819
"time"
@@ -118,11 +119,17 @@ func enrollKeyCardHandleFunc(_ uint, r *Relay) func(http.ResponseWriter, *http.R
118119
} else {
119120
// assuming the enrollment is directly on the relay, without a website involved
120121
if msg.GetDomain() != r.baseURL.Host {
122+
fmt.Fprintf(os.Stderr, "msg domain: %s\n", msg.GetDomain())
123+
fmt.Fprintf(os.Stderr, "url host: %s\n", r.baseURL.Host)
124+
121125
return http.StatusBadRequest, fmt.Errorf("domain did not match")
122126
}
123127

124128
siweURI := msg.GetURI()
125129
if siweURI.Host != r.baseURL.Host {
130+
fmt.Fprintf(os.Stderr, "siwe URI: %s\n", siweURI.Host)
131+
fmt.Fprintf(os.Stderr, "url host: %s\n", r.baseURL.Host)
132+
126133
return http.StatusBadRequest, fmt.Errorf("domain did not match")
127134
}
128135

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func (m *Metric) connect() {
220220

221221
func (m *Metric) gaugeSet(name string, value float64) {
222222
if logMetrics {
223-
log("metric.emit name=%s value=%d", name, value)
223+
log("metric.emit name=%s value=%f", name, value)
224224
}
225225

226226
m.mu.Lock()

0 commit comments

Comments
 (0)