Skip to content

Commit

Permalink
Merge PWA icons, logo and favicon rules in nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsible committed Nov 13, 2020
1 parent 6149ecb commit 2056071
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions support/nginx/peertube
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,8 @@ server {
}

# Bypass PeerTube for performance reasons. Could be removed
# Must be consistent with static client-overrides list in /server/controllers/client.ts
location ~ ^/client/(assets/images/(logo\.svg|favicon\.png)) {
add_header Cache-Control "public, max-age=31536000, immutable";

root /var/www/peertube;

try_files /storage/client-overrides/$1 /peertube-latest/client/dist/$1 $uri;
}

# Bypass PeerTube for performance reasons. Could be removed
# Must be consistent with static client-overrides list in /server/controllers/client.ts
location ~ ^/client/(assets/images/icons/icon-(36x36|48x48|72x72|96x96|144x144|192x192|512x512)\.png)$ {
# Should be consistent with client-overrides assets list in /server/controllers/client.ts
location ~ ^/client/(assets/images/(icons-36x36\.png|icons-48x48\.png|icons-72x72\.png|icons-96x96\.png|icons-144x144\.png|icons-192x192\.png|icons-512x512\.png|logo\.svg|favicon\.png))$ {
add_header Cache-Control "public, max-age=31536000, immutable";

root /var/www/peertube;
Expand Down

0 comments on commit 2056071

Please sign in to comment.