mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-04 08:29:18 +01:00
Make files coming out of the Files tool cacheable, since this improves
performance (e.g., for profile images) and you need to know a highly entropic PHID to access a file in the first place, plus installs should generally be doing HTTPS.
This commit is contained in:
parent
675ce22bf4
commit
22767b80af
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ class PhabricatorFileViewController extends PhabricatorFileController {
|
|||
$data = $file->loadFileData();
|
||||
$response = new AphrontFileResponse();
|
||||
$response->setContent($data);
|
||||
$response->setCacheDurationInSeconds(60 * 60 * 24 * 30);
|
||||
|
||||
if ($this->view == 'view') {
|
||||
if (!$file->isViewableInBrowser()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue