1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00
transmission_ynh/conf/nginx.conf

46 lines
1.1 KiB
Nginx Configuration File
Raw Permalink Normal View History

location __PATH__/transmission/rpc {
proxy_pass http://127.0.0.1:__PORT____PATH__/transmission/rpc;
2022-07-03 20:36:04 +02:00
more_clear_input_headers 'Accept-Encoding';
2019-06-03 16:01:40 +02:00
2022-07-03 20:36:04 +02:00
client_max_body_size 8M;
2019-06-03 16:01:40 +02:00
# This is a fix up for RPC login. Client is either a browser
# (SSOwAuthUser cookie) or a transmission-remote client (Basic Auth)
# If none is present, return a 401.
set $rpcauth 0;
if ($http_authorization ~ "Basic .*") {
set $rpcauth 1;
}
if ($cookie_SSOwAuthUser != "") {
set $rpcauth 1;
}
if ($rpcauth = 0) {
more_set_headers "WWW-Authenticate: Basic";
return 401;
}
2022-07-03 20:36:04 +02:00
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
2013-10-29 14:14:27 +01:00
}
2017-06-13 23:37:51 +02:00
2019-05-01 13:24:56 +02:00
location __PATH__/ {
2022-07-03 20:36:04 +02:00
proxy_pass http://127.0.0.1:__PORT____PATH__/;
more_clear_input_headers 'Accept-Encoding';
client_max_body_size 8M;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
2013-10-29 14:14:27 +01:00
}
2017-06-13 23:37:51 +02:00
location __PATH__/downloads/ {
alias __DATA_DIR__/completed/;
2022-07-03 20:39:22 +02:00
charset UTF-8;
2022-07-03 20:36:04 +02:00
autoindex on;
autoindex_exact_size off;
more_clear_input_headers 'Accept-Encoding';
2014-05-29 11:25:26 +02:00
2022-07-03 20:36:04 +02:00
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
2013-10-29 16:05:20 +01:00
}