Fixed #15946 - added comtent type to webhook test

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2025-01-17 16:36:43 +00:00
parent 57f80290a1
commit 221ffb446c

View file

@ -159,7 +159,7 @@ class SlackSettingsForm extends Component
]);
try {
$test = $webhook->post($this->webhook_endpoint, ['body' => $payload]);
$test = $webhook->post($this->webhook_endpoint, ['body' => $payload, ['headers' => ['Content-Type' => 'application/json']]]);
if(($test->getStatusCode() == 302)||($test->getStatusCode() == 301)){
return session()->flash('error' , trans('admin/settings/message.webhook.error_redirect', ['endpoint' => $this->webhook_endpoint]));