2022-05-29 12:45:09 +02:00
|
|
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
|
|
|
location __PATH__/ {
|
2015-02-17 03:39:33 +01:00
|
|
|
|
2022-05-29 12:45:09 +02:00
|
|
|
# Path to source
|
2024-02-29 10:11:40 +01:00
|
|
|
alias __INSTALL_DIR__/live/public/;
|
2019-12-02 21:04:01 +01:00
|
|
|
|
2022-09-26 02:56:12 +02:00
|
|
|
# Configure maximum picture size
|
|
|
|
# Note that Diaspora has a client side check set at 4M
|
2019-12-02 21:04:01 +01:00
|
|
|
client_max_body_size 5M;
|
|
|
|
client_body_buffer_size 256K;
|
|
|
|
|
2022-09-26 02:56:12 +02:00
|
|
|
# Proxy if requested file not found
|
2019-12-02 21:04:01 +01:00
|
|
|
try_files $uri @diaspora;
|
|
|
|
|
2022-05-29 12:45:09 +02:00
|
|
|
location __PATH__/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
|
|
|
}
|
|
|
|
|
2022-05-29 12:45:09 +02:00
|
|
|
# Include SSOWAT user panel.
|
2019-12-02 21:04:01 +01:00
|
|
|
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;
|
2024-03-08 23:05:47 +01:00
|
|
|
proxy_set_header Host $host;
|
2019-12-02 21:04:01 +01:00
|
|
|
proxy_redirect off;
|
|
|
|
|
2024-08-30 22:47:53 +02:00
|
|
|
proxy_pass http://unix:/run/__APP__/diaspora.sock;
|
2019-12-02 21:04:01 +01:00
|
|
|
}
|