2015-03-01 23:06:20 +01:00
|
|
|
# Proxy if requested file not found
|
2020-05-03 13:36:48 +02:00
|
|
|
location / {
|
2015-02-17 03:39:33 +01:00
|
|
|
|
2019-12-02 21:04:01 +01:00
|
|
|
root __FINALPATH__/diaspora/public;
|
|
|
|
|
|
|
|
# Configure maximum picture size
|
|
|
|
# Note that Diaspora has a client side check set at 4M
|
|
|
|
client_max_body_size 5M;
|
|
|
|
client_body_buffer_size 256K;
|
|
|
|
|
|
|
|
# Proxy if requested file not found
|
|
|
|
try_files $uri @diaspora;
|
|
|
|
|
2020-05-03 13:36:48 +02:00
|
|
|
location /assets/ {
|
2019-12-02 21:04:01 +01:00
|
|
|
expires max;
|
2020-05-01 17:40:51 +02:00
|
|
|
more_set_headers 'Cache-Control: public';
|
2019-12-02 21:04:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# Include SSOWAT user panel.
|
|
|
|
# TODO check that
|
|
|
|
include conf.d/yunohost_panel.conf.inc;
|
2015-02-17 03:39:33 +01:00
|
|
|
}
|
|
|
|
|
2019-12-02 21:04:01 +01:00
|
|
|
location @diaspora {
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_redirect off;
|
|
|
|
|
|
|
|
proxy_pass http://unix:/run/__NAME__/diaspora.sock;
|
|
|
|
|
|
|
|
}
|