Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use built in response cacheFor function
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv authored and juliusknorr committed Jul 19, 2018
commit ccd70a4099f96071ad6a5655bcae81fd3bf4a38a
2 changes: 1 addition & 1 deletion core/Controller/SvgController.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private function getSvg(string $path, string $color) {

// Set cache control
$ttl = 31536000;
$response->addHeader('Cache-Control', 'max-age=' . $ttl . ', immutable');
$response->cacheFor($ttl);
$response->addHeader('Content-Disposition', 'inline; filename="' . $fileName . '.svg"');
$expires = new \DateTime();
$expires->setTimestamp($this->timeFactory->getTime());
Expand Down