File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -101,10 +101,15 @@ public function scoreboardDataZipAction(
101
101
}
102
102
103
103
#[Route(path: '/scoreboard-category-color.css ' , name: 'scoreboard_category_color_css ' )]
104
- public function scoreboardCategoryColorCss (): Response {
104
+ public function scoreboardCategoryColorCss (Request $ request ): Response {
105
+ $ content = $ this ->renderView ('public/scoreboard_category_color.css.twig ' , $ this ->dj ->getScoreboardCategoryColorCss ());
105
106
$ response = new Response ();
106
107
$ response ->headers ->set ('Content-Type ' , 'text/css ' );
107
- $ response ->setContent ($ this ->renderView ('public/scoreboard_category_color.css.twig ' , $ this ->dj ->getScoreboardCategoryColorCss ()));
108
+ // See: https://symfony.com/doc/current/http_cache/validation.html
109
+ $ response ->setEtag (md5 ($ content ));
110
+ $ response ->setPublic ();
111
+ $ response ->isNotModified ($ request );
112
+ $ response ->setContent ($ content );
108
113
return $ response ;
109
114
}
110
115
You can’t perform that action at this time.
0 commit comments