mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
update grafana extension
This commit is contained in:
parent
e2a2e27fe7
commit
82c8d519b4
@ -3,7 +3,7 @@
|
|||||||
// Allow Grafana proxy
|
// Allow Grafana proxy
|
||||||
header('Access-Control-Allow-Origin: *');
|
header('Access-Control-Allow-Origin: *');
|
||||||
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
|
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
|
||||||
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization');
|
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization, Authorization');
|
||||||
|
|
||||||
// Get all request headers
|
// Get all request headers
|
||||||
$headers = apache_request_headers();
|
$headers = apache_request_headers();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Allow Grafana proxy.
|
// Allow Grafana proxy.
|
||||||
header('Access-Control-Allow-Origin: *');
|
header('Access-Control-Allow-Origin: *');
|
||||||
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
|
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
|
||||||
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization');
|
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization, Authorization');
|
||||||
|
|
||||||
// Get all request headers.
|
// Get all request headers.
|
||||||
$headers = apache_request_headers();
|
$headers = apache_request_headers();
|
||||||
@ -38,7 +38,7 @@ if ($headers['Authorization']) {
|
|||||||
$result_data = [];
|
$result_data = [];
|
||||||
|
|
||||||
// Decode target data sent by datasource plugin in Grafana
|
// Decode target data sent by datasource plugin in Grafana
|
||||||
$target_data = json_decode($target['target'], true);
|
$target_data = $target['target'];
|
||||||
|
|
||||||
if ($target_data['module']) {
|
if ($target_data['module']) {
|
||||||
// Get module name as target if not defined in Grafana.
|
// Get module name as target if not defined in Grafana.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// Allow Grafana proxy
|
// Allow Grafana proxy
|
||||||
header('Access-Control-Allow-Origin: *');
|
header('Access-Control-Allow-Origin: *');
|
||||||
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
|
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
|
||||||
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization');
|
header('Access-Control-Allow-Headers: Origin, Content-Type, Accept, X-Grafana-Org-Id, X-Grafana-NoCache, X-DS-Authorization, Authorization');
|
||||||
|
|
||||||
// Get all request headers
|
// Get all request headers
|
||||||
$headers = apache_request_headers();
|
$headers = apache_request_headers();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user