Skip to content

Commit

Permalink
Improve nginx client images cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Jul 29, 2019
1 parent 1f82e3e commit c928e13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion shared/extra-utils/miscs/miscs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ function buildAbsoluteFixturePath (path: string, customCIPath = false) {
return path
}

if (customCIPath && process.env.GITLAB_CI) return join(root(), 'cached-fixtures', path)
if (customCIPath) {
if (process.env.GITLAB_CI) return join(root(), 'cached-fixtures', path)

if (process.env.TRAVIS) return join(process.env.HOME, 'fixtures', path)
}

return join(root(), 'server', 'tests', 'fixtures', path)
}
Expand Down
2 changes: 1 addition & 1 deletion support/nginx/peertube
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ server {
}

# Bypass PeerTube for performance reasons. Could be removed
location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ {
location ~ ^/client/(.*\.(js|css|png|svg|woff2|otf|ttf|woff|eot))$ {
add_header Cache-Control "public, max-age=31536000, immutable";

alias /var/www/peertube/peertube-latest/client/dist/$1;
Expand Down

0 comments on commit c928e13

Please sign in to comment.