Added user registration

This commit is contained in:
2025-02-14 18:49:46 +11:00
parent 5c8bec0ad2
commit 5616b8a248
11 changed files with 405 additions and 44 deletions

View File

@@ -24,12 +24,11 @@ func SetPageFrom(w http.ResponseWriter, r *http.Request, trustedHost string) {
if err != nil {
return
}
// NOTE: its possible this could cause an infinite redirect
// if that happens, will need to add a way to 'blacklist' certain paths
// from being set here
var pageFrom string
if parsedURL.Path == "" || parsedURL.Host != trustedHost {
pageFrom = "/"
} else if parsedURL.Path == "/login" || parsedURL.Path == "/register" {
return
} else {
pageFrom = parsedURL.Path
}