Skip to content

High performance self-hosted photo and video management solution.

chore: webhook headers ordering (#29695)

bo0tzzd2a46ade7812
diff --git a/packages/plugin-core/src/index.ts b/packages/plugin-core/src/index.ts
index ff40414339..59279b4de6 100644
--- a/packages/plugin-core/src/index.ts
+++ b/packages/plugin-core/src/index.ts
@@ -151,14 +151,14 @@ const methods = wrapper<Manifest>({
}),
webhook: ({ config, data, functions, type, trigger }) => {
- const headers: Record<string, string> = {
- 'Content-Type': 'application/json',
- };
+ const headers: Record<string, string> = {};
if (config.headerName && config.headerValue) {
headers[config.headerName] = config.headerValue;
}
+ headers['Content-Type'] = 'application/json';
+
functions.httpRequest(config.url, {
method: config.method ?? 'POST',
body: JSON.stringify({