1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Avoid custom stylesheet to be cached by third-party CDN

If the application is hosted behind a CDN like Cloudflare,
then all custom stylesheets is be the same for all users.

The random query string prevent the CDN to cache this.
This commit is contained in:
Frédéric Guillot 2021-05-21 13:57:11 -07:00 committed by fguillot
parent 75ac58abdf
commit 1005fb973e
2 changed files with 5 additions and 1 deletions

View file

@ -36,7 +36,7 @@
<meta name="theme-color" content="{{ theme_color .theme }}">
<link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" .theme }}?{{ .theme_checksum }}">
{{ if and .user .user.Stylesheet }}
<link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" "custom_css" }}">
<link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" "custom_css" }}?{{ rand }}">
{{ end }}
<script type="text/javascript" src="{{ route "javascript" "name" "app" }}?{{ .app_js_checksum }}" defer></script>