mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
Fix review findings validating OM-84
This commit is contained in:
1 parent
d6e5ef0b1f
commit
8f23959a01
2 files changed
+9
No files matched your search
@@ -83,6 +83,13 @@ export const SecretAllowedHostSchema = z
|
||||
code: 'custom',
|
||||
message: 'Host must be a hostname or a *.wildcard hostname without a scheme, port, path, or IP address',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (host.startsWith('*.') && !host.slice(2).includes('.')) {
|
||||
ctx.addIssue({
|
||||
code: 'custom',
|
||||
message: 'Wildcard hosts must cover a domain with at least two labels, such as *.example.com',
|
||||
})
|
||||
}
|
||||
})
|
||||
.transform((host) => host.toLowerCase())
|
||||
|
||||
Reference in new issue
Block a user