mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-24 05:05:39 +00:00
add: protocol verification for certificate domain
This commit is contained in:
@@ -25,7 +25,10 @@ const ClientCertSettings = ({ root, clientCertConfig, onUpdate, onRemove }) => {
|
||||
passphrase: ''
|
||||
},
|
||||
validationSchema: Yup.object({
|
||||
domain: Yup.string().required(),
|
||||
domain: Yup.string()
|
||||
.required()
|
||||
.test('no-protocol', 'Domain should not include protocols (http://, https://, etc.)',
|
||||
value => !value || !/^(https?:\/\/|ftp:\/\/)/i.test(value)),
|
||||
type: Yup.string().required().oneOf(['cert', 'pfx']),
|
||||
certFilePath: Yup.string().when('type', {
|
||||
is: (type) => type == 'cert',
|
||||
|
||||
Reference in New Issue
Block a user