Skip to content

Commit 789c59e

Browse files
committed
update regex to allow special characters
1 parent b804cef commit 789c59e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ client:
177177
## Validation Regex on the request SDK Key
178178
## By default Agent assumes only alphanumeric characters as part of the SDK Key string.
179179
## https://github.com/google/re2/wiki/Syntax
180-
sdkKeyRegex: "^\\w+(:\\w+)?$"
180+
SdkKeyRegex: "^[a-zA-Z0-9=-]+(:[a-zA-Z0-9=-]+)?$"
181181
## configure optional User profile service
182182
userProfileService:
183183
default: ""

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func NewDefaultConfig() *AgentConfig {
8282
DatafileURLTemplate: "https://cdn.optimizely.com/datafiles/%s.json",
8383
EventURL: "https://logx.optimizely.com/v1/events",
8484
// https://github.com/google/re2/wiki/Syntax
85-
SdkKeyRegex: "^\\w+(:\\w+)?$",
85+
SdkKeyRegex: "^[a-zA-Z0-9=-]+(:[a-zA-Z0-9=-]+)?$",
8686
UserProfileService: UserProfileServiceConfigs{
8787
"default": "",
8888
"services": map[string]interface{}{},

0 commit comments

Comments
 (0)