aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-01-18 17:00:09 +0100
committerLukas Reschke <lukas@statuscode.ch>2017-01-18 17:00:09 +0100
commitbe3ec7ffb78aa42731e4e1170b5c190549d87e75 (patch)
tree1fb51c373fc437d9a004402ed60769a8cb0a7902 /apps/theming/lib
parent29d2ca59912f1de1d9b76eb05941e52bd8c8a88a (diff)
downloadnextcloud-server-be3ec7ffb78aa42731e4e1170b5c190549d87e75.tar.gz
nextcloud-server-be3ec7ffb78aa42731e4e1170b5c190549d87e75.zip
Use DataDownloadResponse
1. As documented 2. No need to show this inline, downloading has security advantages Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/Controller/ThemingController.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php
index 73e3ed3a4b4..15bbfc30c54 100644
--- a/apps/theming/lib/Controller/ThemingController.php
+++ b/apps/theming/lib/Controller/ThemingController.php
@@ -445,8 +445,7 @@ class ThemingController extends Controller {
cacheBuster: ' . json_encode($cacheBusterValue). '
};
})();';
- $response = new Http\DataDisplayResponse($responseJS);
- $response->addHeader('Content-type', 'text/javascript');
+ $response = new DataDownloadResponse($responseJS, 'javascript', 'text/javascript');
$response->addHeader('Expires', date(\DateTime::RFC2822, $this->timeFactory->getTime()));
$response->addHeader('Pragma', 'cache');
$response->cacheFor(3600);