Skip to content

Commit

Permalink
server: increase max length of base path to 128
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Jan 28, 2021
1 parent 148d92f commit 7bd1638
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -82,7 +82,7 @@ OPTIONS:
-o, --once Accept only one client and exit on disconnection
-B, --browser Open terminal with the default system browser
-I, --index Custom index.html path
-b, --base-path Expected base path for requests coming from a reverse proxy (eg: /mounted/here)
-b, --base-path Expected base path for requests coming from a reverse proxy (eg: /mounted/here, max length: 128)
-P, --ping-interval Websocket ping interval(sec) (default: 300)
-6, --ipv6 Enable IPv6 support
-S, --ssl Enable SSL
Expand Down
2 changes: 1 addition & 1 deletion man/ttyd.1
Expand Up @@ -97,7 +97,7 @@ Cross platform: macOS, Linux, FreeBSD/OpenBSD, OpenWrt/LEDE, Windows

.PP
\-b, \-\-base\-path
Expected base path for requests coming from a reverse proxy (eg: /mounted/here)
Expected base path for requests coming from a reverse proxy (eg: /mounted/here, max length: 128)

.PP
\-P, \-\-ping\-interval
Expand Down
2 changes: 1 addition & 1 deletion man/ttyd.man.md
Expand Up @@ -65,7 +65,7 @@ ttyd 1 "September 2016" ttyd "User Manual"
Custom index.html path

-b, --base-path
Expected base path for requests coming from a reverse proxy (eg: /mounted/here)
Expected base path for requests coming from a reverse proxy (eg: /mounted/here, max length: 128)

-P, --ping-interval
Websocket ping interval(sec) (default: 300)
Expand Down
2 changes: 1 addition & 1 deletion src/server.c
Expand Up @@ -115,7 +115,7 @@ static void print_help() {
" -o, --once Accept only one client and exit on disconnection\n"
" -B, --browser Open terminal with the default system browser\n"
" -I, --index Custom index.html path\n"
" -b, --base-path Expected base path for requests coming from a reverse proxy (eg: /mounted/here)\n"
" -b, --base-path Expected base path for requests coming from a reverse proxy (eg: /mounted/here, max length: 128)\n"
#if LWS_LIBRARY_VERSION_NUMBER >= 4000000
" -P, --ping-interval Websocket ping interval(sec) (default: 300)\n"
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/server.h
Expand Up @@ -62,7 +62,7 @@ struct pss_tty {
int initial_cmd_index;
bool authenticated;
char address[50];
char path[20];
char path[128];

struct lws *wsi;
char *buffer;
Expand Down

0 comments on commit 7bd1638

Please sign in to comment.