Skip to content

Commit 2a2907b

Browse files
committed
debugging 👎️
1 parent 46f1e84 commit 2a2907b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

internals/proxy/middlewares/template.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ func (data TemplateMiddleware) Use() http.Handler {
107107
func TemplateBody(data map[string]any, VARIABLES any) (map[string]any, bool, error) {
108108
var modified bool
109109

110+
log.Dev(utils.ToJson(data))
111+
110112
templatedData, err := templating.RenderJSONTemplate("body", data, VARIABLES)
111113

112114
if err != nil {

utils/templating/templating.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func normalizeJSON(value any) string {
4040
return value.(string)
4141
}
4242
}
43+
4344
func ParseTemplate(templt *template.Template, tmplStr string, variables any) (string, error) {
4445
tmpl, err := templt.Parse(tmplStr)
4546

0 commit comments

Comments
 (0)