mirror of
https://github.com/fosrl/pangolin.git
synced 2026-12-03 03:37:19 +00:00
Event-streaming body templates only expanded {{data}} as a raw JSON
object, so a single field could not be put inside a quoted string.
Endpoints such as Discord webhooks need plain strings in places like
embed field values, and quoting {{data}} produced invalid JSON that was
then sent as one JSON string, which Discord rejects.
Templates now also accept {{<field>}} for any top-level field of the
event's data (for example {{orgId}} or {{path}}), as alert-rule
webhooks already do. Values are JSON-escaped so they are safe inside
quotes; null renders as empty text. {{event}}, {{timestamp}} and {{data}}
keep their meaning, including for request logs, whose rows have their
own timestamp column. Placeholders are expanded in one pass so values
are never expanded again, and unknown placeholders are left as-is.
The destination form explains the placeholders.
Fixes #4129
|
||
|---|---|---|
| .. | ||
| auth | ||
| db | ||
| emails | ||
| lib | ||
| license | ||
| middlewares | ||
| private | ||
| routers | ||
| setup | ||
| types | ||
| aiGatewayServer.ts | ||
| apiServer.ts | ||
| certificates.ts | ||
| cleanup.ts | ||
| dns.ts | ||
| extendZod.ts | ||
| index.ts | ||
| integrationApiServer.ts | ||
| internalServer.ts | ||
| logger.ts | ||
| nextServer.ts | ||
| openApi.ts | ||
| startSchedulers.ts | ||