diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-05-30 07:15:37 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-05-30 07:15:37 +0400 |
commit | 8698554d33eef38b3f085f757f37b520a4a34bd6 (patch) | |
tree | 932196d75dc3b7af7d1719f457d987e2a4e590ef /plugins/Installation/ServerFilesGenerator.php | |
parent | 77aad58827e4e96a0d3a92103e62c9965dba2a4b (diff) |
Serve HTML files as text/html mime type fixes #5266
Diffstat (limited to 'plugins/Installation/ServerFilesGenerator.php')
-rw-r--r-- | plugins/Installation/ServerFilesGenerator.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/Installation/ServerFilesGenerator.php b/plugins/Installation/ServerFilesGenerator.php index 255cea6314..3f0ece9114 100644 --- a/plugins/Installation/ServerFilesGenerator.php +++ b/plugins/Installation/ServerFilesGenerator.php @@ -32,6 +32,10 @@ class ServerFilesGenerator "</Files>\n"; $allowStaticAssets = + "# Serve HTML files as text/html mime type\n" . + "AddHandler text/html .html\n" . + "AddHandler text/html .htm\n\n" . + "# Allow to serve static files which are safe\n" . "<Files ~ \"\\.(gif|ico|jpg|png|svg|js|css|htm|html|swf|mp3|mp4|wav|ogg|avi)$\">\n" . $allow . "\n" . @@ -74,7 +78,7 @@ class ServerFilesGenerator * @param bool $overwrite whether to overwrite an existing file or not * @param string $content */ - public static function createHtAccess($path, $overwrite = true, $content) + protected static function createHtAccess($path, $overwrite = true, $content) { if (SettingsServer::isApache()) { $file = $path . '/.htaccess'; |