mirror of
https://github.com/mastodon/documentation
synced 2025-04-11 22:56:17 +02:00
add nginx config for static assets
This commit is contained in:
parent
863a5ea716
commit
32f4c5319f
@ -63,6 +63,12 @@ server {
|
||||
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 {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user