nginx: add reverse proxy route for ttyd

This commit is contained in:
hayzamjs 2022-11-18 12:18:58 +01:00
parent 1c3540868e
commit 78cc85cf2d

View file

@ -9,6 +9,14 @@ location /ubus {
ubus_socket_path /var/run/ubus/ubus.sock; ubus_socket_path /var/run/ubus/ubus.sock;
ubus_parallel_req 2; ubus_parallel_req 2;
} }
location ~ ^/ttyd(.*)$ {
proxy_http_version 1.1;
proxy_set_header Upgrade '$http_upgrade';
proxy_set_header Connection "upgrade";
proxy_pass http://'$server_addr':7681/'$1';
}
EOT EOT
fi fi
fi fi