add nginx config for static assets
This commit is contained in:
parent
863a5ea716
commit
32f4c5319f
|
@ -63,6 +63,12 @@ server {
|
||||||
try_files $uri @proxy;
|
try_files $uri @proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /assets {
|
||||||
|
# Serve static, checksummed assets directly from nginx as a perf boost
|
||||||
|
root /home/mastodon/live/public;
|
||||||
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
}
|
||||||
|
|
||||||
location @proxy {
|
location @proxy {
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
Loading…
Reference in New Issue