diff --git a/packages/bruno-app/src/components/CollectionSettings/ClientCertSettings/index.js b/packages/bruno-app/src/components/CollectionSettings/ClientCertSettings/index.js index 0bc91b5c3..e4eb6c290 100644 --- a/packages/bruno-app/src/components/CollectionSettings/ClientCertSettings/index.js +++ b/packages/bruno-app/src/components/CollectionSettings/ClientCertSettings/index.js @@ -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',