mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-13 22:13:03 +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) {
|
||||
$path = LStemplate :: getLibFilePath($request -> file);
|
||||
if ($path && is_file($path)) {
|
||||
switch (strtolower(substr($path, -4))) {
|
||||
case '.css':
|
||||
$info = new SplFileInfo($path);
|
||||
switch ($info -> getExtension()) {
|
||||
case 'css':
|
||||
$mime_type = 'text/css';
|
||||
break;
|
||||
case '.js':
|
||||
case 'js':
|
||||
$mime_type = 'text/javascript';
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue