aboutsummaryrefslogtreecommitdiff
path: root/conf/nginx.conf
diff options
context:
space:
mode:
authornemsia <nemsia@nemsia.org>2017-05-22 00:42:09 +0200
committerGitHub <noreply@github.com>2017-05-22 00:42:09 +0200
commit3a02566f0a1ad50c3949f715a8bd7660c409d483 (patch)
tree4ae92a4b8ac255f52154a5743f7d45ebc6d9fcbf /conf/nginx.conf
parente52a9dcb50bc05549d73f2b7c030c6fbf22604a5 (diff)
downloadmastodon_ynh-3a02566f0a1ad50c3949f715a8bd7660c409d483.tar.gz
mastodon_ynh-3a02566f0a1ad50c3949f715a8bd7660c409d483.tar.bz2
mastodon_ynh-3a02566f0a1ad50c3949f715a8bd7660c409d483.zip
Fix upgrade 1.4 (#33)
* [fix] Upgrade nodejs + conf protobuf Fix mastodon 1.4 upgrade
Diffstat (limited to 'conf/nginx.conf')
-rw-r--r--conf/nginx.conf9
1 files changed, 9 insertions, 0 deletions
diff --git a/conf/nginx.conf b/conf/nginx.conf
index 0d48dc5..85f883c 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 /opt/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;