mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-26 13:01:08 -05:00
throw 404 on notfound
This commit is contained in:
parent
285ecd724a
commit
06554e44a8
@ -206,6 +206,14 @@ class Theme_assets extends CI_Controller
|
|||||||
$file_path = 'themes/default/js/' . $js_file;
|
$file_path = 'themes/default/js/' . $js_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return empty string if not found, to not mess up existing JS
|
||||||
|
|
||||||
|
if (!file_exists($file_path))
|
||||||
|
{
|
||||||
|
header('HTTP/1.1 404 Not Found');
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
//send
|
//send
|
||||||
header('Content-Type: application/x-javascript; charset=utf-8');
|
header('Content-Type: application/x-javascript; charset=utf-8');
|
||||||
$this->_expires_header(30);
|
$this->_expires_header(30);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user