From 1f28ed8a0a070392b44342952a5b350f9af05eb8 Mon Sep 17 00:00:00 2001 From: oparoz Date: Mon, 11 Jul 2016 14:08:25 +0200 Subject: [PATCH] Make theming work with pretty URLs In some envs the rewrite rules for pretty URLs apply to all CSS files, so let's not end the route name with that etension. Fixes #315 (cherry picked from commit 839ee5e) --- apps/theming/appinfo/routes.php | 2 +- apps/theming/lib/controller/themingcontroller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/theming/appinfo/routes.php b/apps/theming/appinfo/routes.php index ac0463e2c2..dcbb0618fa 100644 --- a/apps/theming/appinfo/routes.php +++ b/apps/theming/appinfo/routes.php @@ -40,7 +40,7 @@ namespace OCA\Theming\AppInfo; ], [ 'name' => 'Theming#getStylesheet', - 'url' => '/styles.css', + 'url' => '/styles', 'verb' => 'GET', ], [ diff --git a/apps/theming/lib/controller/themingcontroller.php b/apps/theming/lib/controller/themingcontroller.php index 995f929b51..a9ac36ca78 100644 --- a/apps/theming/lib/controller/themingcontroller.php +++ b/apps/theming/lib/controller/themingcontroller.php @@ -234,7 +234,7 @@ class ThemingController extends Controller { \OC_Response::setExpiresHeader(gmdate('D, d M Y H:i:s', time() + (60*60*24*45)) . ' GMT'); \OC_Response::enableCaching(); - $response = new Http\DataDownloadResponse($responseCss, 'style.css', 'text/css'); + $response = new Http\DataDownloadResponse($responseCss, 'style', 'text/css'); $response->cacheFor(3600); return $response; }