Add "Cancel" action to proxy intercept

This commit is contained in:
David Stotijn
2022-03-14 09:12:36 +01:00
parent 9dd8464af7
commit e1067ecffb
8 changed files with 297 additions and 10 deletions

View File

@ -144,6 +144,11 @@ func (svc *Service) ModifyRequest(reqID ulid.ULID, modReq *http.Request) error {
}
}
// CancelRequest ensures an intercepted request is dropped.
func (svc *Service) CancelRequest(reqID ulid.ULID) error {
return svc.ModifyRequest(reqID, nil)
}
func (svc *Service) ClearRequests() {
svc.mu.Lock()
defer svc.mu.Unlock()