summaryrefslogtreecommitdiff
path: root/client/id.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/id.go')
-rw-r--r--client/id.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/client/id.go b/client/id.go
index b4e1670..165e2a0 100644
--- a/client/id.go
+++ b/client/id.go
@@ -1,5 +1,7 @@
package client
+import "slices"
+
// isAllowedClientID checks if the 'clientID' is in the list of allowed client IDs
func isAllowedClientID(clientID string) bool {
allowList := []string{
@@ -22,12 +24,7 @@ func isAllowedClientID(clientID string) bool {
"org.govvpn.app.macos",
"org.govvpn.app.linux",
}
- for _, x := range allowList {
- if x == clientID {
- return true
- }
- }
- return false
+ return slices.Contains(allowList, clientID)
}
func userAgentName(clientID string) string {