Add the config option "keep responses"

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-18 23:12:01 +02:00
parent 7e1b7d3b5a
commit 615093bd8b
4 changed files with 14 additions and 1 deletions
+6 -1
View File
@@ -177,7 +177,12 @@ func (b *Broker) SaveEntry(f *proxy.Flow) {
Path: path,
StatusCode: status,
RequestRaw: FormatRawRequest(f),
ResponseRaw: FormatRawResponse(f),
ResponseRaw: func() string {
if config.Global.History.KeepResponses {
return FormatRawResponse(f)
}
return ""
}(),
}
if cb := b.onBeforeNewEntry; cb != nil {
if !cb(pending) {