summaryrefslogtreecommitdiff
path: root/internal/util/regexes.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/util/regexes.go')
-rw-r--r--internal/util/regexes.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/util/regexes.go b/internal/util/regexes.go
index 6ad7b7404..13c3ce3ef 100644
--- a/internal/util/regexes.go
+++ b/internal/util/regexes.go
@@ -60,6 +60,9 @@ var (
// userPathRegex parses a path that validates and captures the username part from eg /users/example_username
userPathRegex = regexp.MustCompile(userPathRegexString)
+ userPublicKeyPathRegexString = fmt.Sprintf(`^?/%s/(%s)/%s`, UsersPath, usernameRegexString, PublicKeyPath)
+ userPublicKeyPathRegex = regexp.MustCompile(userPublicKeyPathRegexString)
+
inboxPathRegexString = fmt.Sprintf(`^/?%s/(%s)/%s$`, UsersPath, usernameRegexString, InboxPath)
// inboxPathRegex parses a path that validates and captures the username part from eg /users/example_username/inbox
inboxPathRegex = regexp.MustCompile(inboxPathRegexString)