Browse Source

log which domain was not allowed!

main
forest 2 months ago
parent
commit
473aebcead
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      pkg/server/receive.go

+ 1
- 1
pkg/server/receive.go View File

@ -22,7 +22,7 @@ func (srv *Server) handleReceive(w http.ResponseWriter, r *http.Request) {
}
if srv.cfg.Receiver.TargetPolicy != nil {
if !srv.cfg.Receiver.TargetPolicy(httptest.NewRequest(http.MethodGet, m.Target, nil)) {
srv.sendError(ctx, w, &HTTPError{StatusCode: http.StatusBadRequest, Err: fmt.Errorf("target domain not allowed")})
srv.sendError(ctx, w, &HTTPError{StatusCode: http.StatusBadRequest, Err: fmt.Errorf("target domain %s not allowed", m.Target)})
return
}
}


Loading…
Cancel
Save