mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-21 05:58:23 +02:00
Update webhook request to use POST method with JSON payload
Modify the webhook integration to send data via POST request with a JSON payload, resolving a "400 Request Header Or Cookie Too Large" error caused by excessive custom headers. Replit-Commit-Author: Agent Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/7RlGXpp
This commit is contained in:
1 parent
7a37fcacbd
commit
6ce9ec90a4
3 files changed
+5
-8
No files matched your search
@@ -37,4 +37,4 @@ args = "npm run dev"
|
|||||||
waitForPort = 5000
|
waitForPort = 5000
|
||||||
|
|
||||||
[agent]
|
[agent]
|
||||||
integrations = ["javascript_object_storage==1.0.0", "javascript_database==1.0.0", "javascript_log_in_with_replit==1.0.0"]
|
integrations = ["javascript_object_storage==1.0.0", "javascript_log_in_with_replit==1.0.0", "javascript_database==1.0.0"]
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 232 KiB |
+4
-7
@@ -149,17 +149,14 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
const timeoutId = setTimeout(() => controller.abort(), 60000); // 60 secondes
|
const timeoutId = setTimeout(() => controller.abort(), 60000); // 60 secondes
|
||||||
|
|
||||||
console.log('🌐 BAP: Envoi vers webhook n8n (GET)...');
|
console.log('🌐 BAP: Envoi vers webhook n8n (POST avec body JSON)...');
|
||||||
|
|
||||||
const response = await fetch(webhookUrl, {
|
const response = await fetch(webhookUrl, {
|
||||||
method: 'GET',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json'
|
||||||
'X-PDF-Base64': pdfBase64,
|
|
||||||
'X-Recipient': recipient,
|
|
||||||
'X-FileName': fileName,
|
|
||||||
'X-FileSize': fileBuffer.length.toString()
|
|
||||||
},
|
},
|
||||||
|
body: JSON.stringify(webhookPayload),
|
||||||
signal: controller.signal
|
signal: controller.signal
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user