Skip to content

Commit

Permalink
internal/appsec/dyngo: write response header before body in blocking …
Browse files Browse the repository at this point in the history
…action
  • Loading branch information
Hellzy committed Nov 17, 2022
1 parent 566a6c5 commit dea3413
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/appsec/dyngo/instrumentation/httpsec/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func (h *ActionsHandler) RegisterAction(id string, action Action) {
case *BlockRequestAction:
payload := blockedPayload(a)
a.handler = http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
writer.Write(payload)
writer.WriteHeader(a.Status)
writer.Write(payload)
})
h.actions[id] = a
default:
Expand Down

0 comments on commit dea3413

Please sign in to comment.