mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 05:44:36 +02:00
module/doc: End output buffering before serving module images
refs #3223
This commit is contained in:
parent
226cc2c810
commit
94ea42f30d
@ -176,7 +176,11 @@ class ModuleController extends DocController
|
|||||||
} else {
|
} else {
|
||||||
$finfo = new finfo();
|
$finfo = new finfo();
|
||||||
$this->getResponse()
|
$this->getResponse()
|
||||||
->setHeader('Content-Type', $finfo->file($imagePath, FILEINFO_MIME_TYPE));
|
->setHeader('Content-Type', $finfo->file($imagePath, FILEINFO_MIME_TYPE))
|
||||||
|
->setHeader('Content-Length', $imageInfo->getSize())
|
||||||
|
->sendHeaders();
|
||||||
|
|
||||||
|
ob_end_clean();
|
||||||
readfile($imagePath);
|
readfile($imagePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user