config: start adding path parameters

to change the urls of the admin page, the my account page and of
invites. Seems to work, but need to check all the code over and test.
This commit is contained in:
Harvey Tindall
2025-05-13 21:10:40 +01:00
parent 2d98c6cff4
commit c52ba2162e
43 changed files with 336 additions and 266 deletions

View File

@@ -67,7 +67,8 @@ func (app *appContext) getUserTokenLogin(gc *gin.Context) {
// host := gc.Request.URL.Hostname()
host := app.ExternalDomain
uri := "/my"
if strings.HasPrefix(gc.Request.RequestURI, app.URLBase) {
// FIXME: This seems like a bad idea? I think it's to deal with people having Reverse proxy subfolder/URL base set to /accounts.
if strings.HasPrefix(gc.Request.RequestURI, PAGES.Base) {
uri = "/accounts/my"
}
gc.SetCookie("user-refresh", refresh, REFRESH_TOKEN_VALIDITY_SEC, uri, host, true, true)