1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-09-11 13:15:28 +03:00

fix(n8n Form Trigger Node): Show basic authentication modal on wrong credentials (#10423)

This commit is contained in:
Michael Kret 2024-08-15 14:03:16 +03:00 committed by GitHub
parent 5754fe4ec4
commit 0dc3e99b26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,8 +170,8 @@ export async function formWebhook(
}
} catch (error) {
if (error instanceof WebhookAuthorizationError) {
res.writeHead(error.responseCode, { 'WWW-Authenticate': 'Basic realm="Webhook"' });
res.end(error.message);
res.setHeader('WWW-Authenticate', 'Basic realm="Enter credentials"');
res.status(401).send();
return { noWebhookResponse: true };
}
throw error;