From 26d3657f83ba96b080c9cb0a242ee8b2d8fc1fe1 Mon Sep 17 00:00:00 2001 From: Dan Untenzu Date: Thu, 12 Jan 2017 16:28:47 +0100 Subject: [PATCH] [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 --- lib/functions.js.php | 2 ++ 1 file changed, 2 insertions(+) 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'); -- 2.34.1