summaryrefslogtreecommitdiff
path: root/internal/configuration/schema/const.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/configuration/schema/const.go')
-rw-r--r--internal/configuration/schema/const.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/configuration/schema/const.go b/internal/configuration/schema/const.go
index 073712a6c..8ee9867b2 100644
--- a/internal/configuration/schema/const.go
+++ b/internal/configuration/schema/const.go
@@ -1,6 +1,7 @@
package schema
import (
+ "regexp"
"time"
)
@@ -52,3 +53,7 @@ const (
// TOTPSecretSizeMinimum is the minimum secret size.
TOTPSecretSizeMinimum = 20
)
+
+// regexpHasScheme checks if a string has a scheme. Valid characters for schemes include alphanumeric, hyphen,
+// period, and plus characters.
+var regexpHasScheme = regexp.MustCompile(`^[-+.a-zA-Z\d]+://`)