Improve nginx client images cache
This commit is contained in:
parent
1f82e3e885
commit
c928e1364f
|
@ -64,7 +64,11 @@ function buildAbsoluteFixturePath (path: string, customCIPath = false) {
|
||||||
return path
|
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)
|
return join(root(), 'server', 'tests', 'fixtures', path)
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bypass PeerTube for performance reasons. Could be removed
|
# 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";
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
|
||||||
alias /var/www/peertube/peertube-latest/client/dist/$1;
|
alias /var/www/peertube/peertube-latest/client/dist/$1;
|
||||||
|
|
Loading…
Reference in New Issue