mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
Add authorization header in webhooks stored in secrets table (#941)
Summary: Adding authorization header support for webhooks. Issue: https://github.com/gristlabs/grist-core/issues/827 --------- Co-authored-by: Florent <florent.git@zeteo.me>
This commit is contained in:
@@ -4625,6 +4625,7 @@ function testDocApi() {
|
||||
id: first.webhookId,
|
||||
fields: {
|
||||
url: `${serving.url}/200`,
|
||||
authorization: '',
|
||||
unsubscribeKey: first.unsubscribeKey,
|
||||
eventTypes: ['add', 'update'],
|
||||
enabled: true,
|
||||
@@ -4643,6 +4644,7 @@ function testDocApi() {
|
||||
id: second.webhookId,
|
||||
fields: {
|
||||
url: `${serving.url}/404`,
|
||||
authorization: '',
|
||||
unsubscribeKey: second.unsubscribeKey,
|
||||
eventTypes: ['add', 'update'],
|
||||
enabled: true,
|
||||
@@ -5010,6 +5012,7 @@ function testDocApi() {
|
||||
|
||||
const expectedFields = {
|
||||
url: `${serving.url}/foo`,
|
||||
authorization: '',
|
||||
eventTypes: ['add'],
|
||||
isReadyColumn: 'B',
|
||||
tableId: 'Table1',
|
||||
@@ -5079,6 +5082,8 @@ function testDocApi() {
|
||||
|
||||
await check({isReadyColumn: null}, 200);
|
||||
await check({isReadyColumn: "bar"}, 404, `Column not found "bar"`);
|
||||
|
||||
await check({authorization: 'Bearer fake-token'}, 200);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user