Add configurable headers for webhooks (#8855)

* Add configurable headers for webhooks

* Update api/src/database/migrations/20211016A-add-webhook-headers.ts

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
This commit is contained in:
Jakob
2021-10-29 16:52:44 +02:00
committed by GitHub
parent 8587e2f8ff
commit 15b875728b
7 changed files with 68 additions and 12 deletions

View File

@@ -0,0 +1,13 @@
import { Knex } from 'knex';
export async function up(knex: Knex): Promise<void> {
await knex.schema.alterTable('directus_webhooks', (table) => {
table.json('headers');
});
}
export async function down(knex: Knex): Promise<void> {
await knex.schema.alterTable('directus_webhooks', (table) => {
table.dropColumn('headers');
});
}

View File

@@ -68,6 +68,27 @@ fields:
width: half
display: boolean
- field: headers
special: json
interface: list
options:
template: '{{ header }}: {{ value }}'
addLabel: $t:field_options.directus_webhooks.headers.add
fields:
- field: header
name: $t:field_options.directus_webhooks.headers.header
type: string
meta:
interface: input
width: half
- field: value
name: $t:field_options.directus_webhooks.headers.value
type: string
meta:
interface: input
width: half
width: full
- field: triggers_divider
interface: presentation-divider
options: