fix: Proxy configuration improvements

This commit is contained in:
Davidson Gomes
2023-12-28 10:35:41 -03:00
parent dfc8330035
commit 7c2a8c0abb
10 changed files with 111 additions and 33 deletions

View File

@@ -1086,7 +1086,18 @@ export const proxySchema: JSONSchema7 = {
type: 'object',
properties: {
enabled: { type: 'boolean', enum: [true, false] },
proxy: { type: 'string' },
proxy: {
type: 'object',
properties: {
host: { type: 'string' },
port: { type: 'string' },
protocol: { type: 'string' },
username: { type: 'string' },
password: { type: 'string' },
},
required: ['host', 'port', 'protocol'],
...isNotEmpty('host', 'port', 'protocol'),
},
},
required: ['enabled', 'proxy'],
...isNotEmpty('enabled', 'proxy'),