mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 01:49:08 +01:00
Fix handling mime type on serving libs's static files
This commit is contained in:
parent
e59ab4a94c
commit
89c363bd80
1 changed files with 4 additions and 3 deletions
|
@ -311,11 +311,12 @@ LSurl :: add_handler('#^favicon\.ico#', 'handle_favicon_ico_view', false, true,
|
||||||
function handle_libs_file($request) {
|
function handle_libs_file($request) {
|
||||||
$path = LStemplate :: getLibFilePath($request -> file);
|
$path = LStemplate :: getLibFilePath($request -> file);
|
||||||
if ($path && is_file($path)) {
|
if ($path && is_file($path)) {
|
||||||
switch (strtolower(substr($path, -4))) {
|
$info = new SplFileInfo($path);
|
||||||
case '.css':
|
switch ($info -> getExtension()) {
|
||||||
|
case 'css':
|
||||||
$mime_type = 'text/css';
|
$mime_type = 'text/css';
|
||||||
break;
|
break;
|
||||||
case '.js':
|
case 'js':
|
||||||
$mime_type = 'text/javascript';
|
$mime_type = 'text/javascript';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue