Use correct headers for json data
It was previously not marked as such what could potentially lead to browsers doing some autodetection. Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
b8f1e0f325
commit
0667ea8ac7
@ -57,12 +57,16 @@ if (isset($_REQUEST['filename']) && isset($_REQUEST['image'])) {
|
||||
|
||||
} else if (isset($_REQUEST['monitorconfig'])) {
|
||||
/* For monitor chart config export */
|
||||
PMA_downloadHeader('monitor.cfg', 'application/force-download');
|
||||
PMA_downloadHeader('monitor.cfg', 'application/json; charset=UTF-8');
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
|
||||
echo urldecode($_REQUEST['monitorconfig']);
|
||||
|
||||
} else if (isset($_REQUEST['import'])) {
|
||||
/* For monitor chart config import */
|
||||
header('Content-type: text/plain');
|
||||
header('Content-Type: application/json; charset=UTF-8');
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
|
||||
if (!file_exists($_FILES['file']['tmp_name'])) {
|
||||
exit();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user