From: Dan Untenzu Date: Thu, 12 Jan 2017 15:28:47 +0000 (+0100) Subject: [BUGFIX] Deliver JavaScript with correct MIME type X-Git-Tag: 1.2.0~12 X-Git-Url: https://git.p6c8.net/jirafeau_project.git/commitdiff_plain/26d3657f83ba96b080c9cb0a242ee8b2d8fc1fe1 [BUGFIX] Deliver JavaScript with correct MIME type The JavaScript lib is generated by a PHP file. This file will be blocked in browsers, if the server has the security option "X-Content-Type-Options: nosniff" set. Set the correct MIME type (text/javascript) in the header to avoid this behaviour. Refs #84 --- diff --git a/lib/functions.js.php b/lib/functions.js.php index 24be13f..e8a6bb1 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -18,6 +18,8 @@ * along with this program. If not, see . */ +header('Content-Type: text/javascript'); + define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/../'); require (JIRAFEAU_ROOT . 'lib/config.original.php'); require (JIRAFEAU_ROOT . 'lib/settings.php');