MDL-52835 mod_data: Correct MIME type for JS template
authorMichael de Raadt <michaeld@moodle.com>
Wed, 20 Jan 2016 00:40:39 +0000 (11:40 +1100)
committerMichael de Raadt <michaeld@moodle.com>
Thu, 21 Jan 2016 22:51:08 +0000 (09:51 +1100)
mod/data/js.php

index f76349d..96e4855 100644 (file)
@@ -38,7 +38,7 @@ if ($data = $DB->get_record('data', array('id'=>$d))) {
     header('Expires: ' . gmdate("D, d M Y H:i:s", time() + $lifetime) . ' GMT');
     header('Cache-control: max_age = '. $lifetime);
     header('Pragma: ');
-    header('Content-type: text/css; charset=utf-8');  // Correct MIME type
+    header('Content-type: application/javascript; charset=utf-8');  // Correct MIME type.
 
     echo $data->jstemplate;
 }
\ No newline at end of file