Disable auto discovering mod_xsendfile.

The reason being, there might be cases that user have installed but not
configured the module. Auto discovery here will cause the streaming to
fail. With auto discovery removed, Koel will only stream using
mod_xsendfile if MOD_X_SENDFILE_ENABLED env var is found. Hence, users
can disable it in .htaccess if they're not ready.
This commit is contained in:
An Phan 2015-12-14 12:32:29 +08:00
parent f9edb8af7b
commit daaa7ba747

View file

@ -16,8 +16,7 @@ class SongController extends Controller
*/
public function play($id)
{
if (env('MOD_X_SENDFILE_ENABLED') ||
(function_exists('apache_get_modules') && in_array('mod_xsendfile', apache_get_modules()))) {
if (env('MOD_X_SENDFILE_ENABLED')) {
(new XSendFileStreamer($id))->stream();
return;