Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internals/proxy/middlewares/mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func mappingHandler(next http.Handler) http.Handler {
err := body.Write(req)

if err != nil {
log.Error("Could not write to Request Body: ", err.Error())
http.Error(w, "Internal Error", http.StatusInternalServerError)
return
}
Expand Down
1 change: 1 addition & 0 deletions internals/proxy/middlewares/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func messageHandler(next http.Handler) http.Handler {
err := body.Write(req)

if err != nil {
log.Error("Could not write to Request Body: ", err.Error())
http.Error(w, "Internal Error", http.StatusInternalServerError)
return
}
Expand Down
5 changes: 4 additions & 1 deletion internals/proxy/middlewares/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func templateHandler(next http.Handler) http.Handler {
err := body.Write(req)

if err != nil {
log.Error("Could not write to Request Body: ", err.Error())
http.Error(w, "Internal Error", http.StatusInternalServerError)
return
}
Expand Down Expand Up @@ -182,7 +183,9 @@ func TemplateBody(body map[string]any, headers map[string][]string, VARIABLES ma
// Prefix Header Data with header_key_
prefixedHeaders := prefixData("header_key_", request.ParseHeaders(headers))

variables := VARIABLES
variables := map[string]any{}

maps.Copy(variables, VARIABLES)

maps.Copy(variables, prefixedBody)
maps.Copy(variables, prefixedHeaders)
Expand Down