Deploy: 2026-05-22 02:16:46
This commit is contained in:
@@ -488,11 +488,17 @@ class WhatsAppController extends BaseController
|
||||
]);
|
||||
|
||||
$headers = ['Content-Type: application/json'];
|
||||
if ($endpoint && !empty($endpoint['headers'])) {
|
||||
$customHeaders = json_decode($endpoint['headers'], true);
|
||||
if (is_array($customHeaders)) {
|
||||
foreach ($customHeaders as $key => $value) {
|
||||
$headers[] = "$key: $value";
|
||||
if ($endpoint) {
|
||||
if (!empty($endpoint['api_key'])) {
|
||||
$headers[] = 'X-API-Key: ' . $endpoint['api_key'];
|
||||
$headers[] = 'Authorization: Bearer ' . $endpoint['api_key'];
|
||||
}
|
||||
if (!empty($endpoint['headers'])) {
|
||||
$customHeaders = json_decode($endpoint['headers'], true);
|
||||
if (is_array($customHeaders)) {
|
||||
foreach ($customHeaders as $key => $value) {
|
||||
$headers[] = "$key: $value";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -540,6 +546,10 @@ class WhatsAppController extends BaseController
|
||||
]);
|
||||
|
||||
$headers = ['Content-Type: application/json'];
|
||||
if (!empty($endpoint['api_key'])) {
|
||||
$headers[] = 'X-API-Key: ' . $endpoint['api_key'];
|
||||
$headers[] = 'Authorization: Bearer ' . $endpoint['api_key'];
|
||||
}
|
||||
if (!empty($endpoint['headers'])) {
|
||||
$customHeaders = json_decode($endpoint['headers'], true);
|
||||
if (is_array($customHeaders)) {
|
||||
|
||||
Reference in New Issue
Block a user