Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
1lann committed Jan 5, 2024
1 parent 4900348 commit f804998
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/mini-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ func main() {
})

http.HandleFunc("/config", func(w http.ResponseWriter, r *http.Request) {
log.Println("received register config request")

var config tmpauth.UnserializableConfig
err := json.NewDecoder(r.Body).Decode(&config)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions mini.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ func NewMini(config MiniConfig, next CaddyHandleFunc) (*Tmpauth, error) {
}

func (t *Tmpauth) ReauthMini() error {
log.Println("reauthenticating with mini...")

req, err := http.NewRequest(http.MethodPut, t.miniServerHost+"/config",
bytes.NewReader(t.miniConfigJSON))
if err != nil {
Expand Down

0 comments on commit f804998

Please sign in to comment.