From 0a8d56798310432d6850779df22500f0d97c9e73 Mon Sep 17 00:00:00 2001 From: nemsia Date: Sun, 21 May 2017 22:03:52 +0200 Subject: [PATCH] [fix] Assets not load on v1.4 --- conf/nginx.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 0d48dc5..2432d51 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,9 @@ # upload max size client_max_body_size 100M; +# add to v1.4 assets +root /home/mastodon/live/public; + location / { if ($scheme = http) { @@ -13,6 +16,12 @@ location / { include conf.d/yunohost_panel.conf.inc; } +# add to v1.4 assets +location ~ ^/(assets|system/media_attachments/files|system/accounts/avatars) { + add_header Cache-Control "public, max-age=31536000, immutable"; + try_files $uri @proxy; + } + location @proxy { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;