mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
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:
13
api/src/database/migrations/20211016A-add-webhook-headers.ts
Normal file
13
api/src/database/migrations/20211016A-add-webhook-headers.ts
Normal 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');
|
||||
});
|
||||
}
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user