feat(webhook): switch to --webhook-enable-sync-mode flag instead of header

This commit is contained in:
Julien Neuhart
2025-08-09 16:17:27 +02:00
parent fc11f557fa
commit 02ad6c7834
4 changed files with 9 additions and 15 deletions

View File

@@ -32,14 +32,14 @@ Feature: Webhook
Then the webhook request header "Content-Disposition" should be "inline"
Then there should be 1 PDF(s) in the webhook request
Scenario: Synchronous webhook processing with Gotenberg-Webhook-Sync header
Given I have a default Gotenberg container
Scenario: Synchronous
Given I have a Gotenberg container with the following environment variable(s):
| WEBHOOK_ENABLE_SYNC_MODE | true |
Given I have a webhook server
When I make a "POST" request to Gotenberg at the "/forms/pdfengines/flatten" endpoint with the following form data and header(s):
| files | testdata/page_1.pdf | file |
| Gotenberg-Webhook-Url | http://host.docker.internal:%d/webhook | header |
| Gotenberg-Webhook-Error-Url | http://host.docker.internal:%d/webhook/error | header |
| Gotenberg-Webhook-Sync | true | header |
Then the response status code should be 204
Then the webhook request header "Content-Type" should be "application/pdf"
Then there should be 1 PDF(s) in the webhook request