You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/client/web
Will Norris dc8287ab3b client/web: enforce full path for CGI platforms
Synology and QNAP both run the web client as a CGI script. The old web
client didn't care too much about requests paths, since there was only a
single GET and POST handler. The new client serves assets on different
paths, so now we need to care.

First, enforce that the CGI script is always accessed from its full
path, including a trailing slash (e.g. /cgi-bin/tailscale/index.cgi/).
Then, strip that prefix off before passing the request along to the main
serve handler. This allows for properly serving both static files and
the API handler in a CGI environment. Also add a CGIPath option to allow
other CGI environments to specify a custom path.

Finally, update vite and one "api/data" call to no longer assume that we
are always serving at the root path of "/".

Updates tailscale/corp#13775

Signed-off-by: Will Norris <will@tailscale.com>
2 years ago
..
src client/web: enforce full path for CGI platforms 2 years ago
api.go client/web: invert auth logic for synology and qnap 2 years ago
dev.go client/web: add barebones vite dev setup 2 years ago
index.html client/web: copy existing UI to basic react components 2 years ago
package.json client/web: add csrf protection to web client api 2 years ago
postcss.config.js client/web: add tailwind styling to react app 2 years ago
qnap.go client/web: enforce full path for CGI platforms 2 years ago
synology.go client/web: enforce full path for CGI platforms 2 years ago
tailwind.config.js client/web: add tailwind styling to react app 2 years ago
tsconfig.json client/web: add tsconfig.json 2 years ago
vite.config.ts client/web: enforce full path for CGI platforms 2 years ago
web.css client/web: extract web client from cli package 2 years ago
web.go client/web: enforce full path for CGI platforms 2 years ago
web.html client/web: extract web client from cli package 2 years ago
web_test.go client/web: extract web client from cli package 2 years ago
yarn.lock client/web: add csrf protection to web client api 2 years ago