From: "Omar Polo" Subject: Re: fix gotwebd login when URL location != "/" To: Stefan Sperling Cc: gameoftrees@openbsd.org Date: Mon, 08 Dec 2025 01:28:09 +0100 Stefan Sperling wrote: > Add the gotwebd root URL to login links. Otherwise gotwebd will not receive > login requests if the webserver is not running gotwebd at URL location "/". > > E.g. a config like this just won't work otherwise: > > httpd.conf: > > server "example.com" { > location "/gotweb" { > fastcgi socket "/run/gotweb.sock" > } > location "/gotweb/*" { > fastcgi socket "/run/gotweb.sock" > } > } > > gotwebd.conf: > > server "example.com" { > repos_path "/git" > gotweb_url_root "/gotweb" > repos_url_path "/" # example.com/gotweb/ > enable authentication > permit anonymous > } > > gotsh would still return login URLs such as https://example.com/?login=token > which result in "404 not found" from httpd. > > > ok? makes sense to me; ok op@ > Double-slashes are not a concern this time around since srv->gotweb_url_root > is normalized to "/some/path" while parsing the configuration file (leading > slash will be present, trailing slash won't be). > > > M gotwebd/login.c | 15+ 7- > > 1 file changed, 15 insertions(+), 7 deletions(-) > > commit - 222a9d10ecceca6ca66c57d1a0dc84d13f5a2047 > commit + 290598312f95a3869921f733a9b67cbe9a0bebf0 > blob - 05a894bc5a6b1fdebdf747acaf7d215b24352cbd > blob + b951cb0492a42bb97681b5a7909f7ffb83f76726 > [...]