Initial components for encryption settings

This commit is contained in:
Ildar Kamalov 2019-01-24 18:51:50 +03:00 committed by Eugene Bujak
parent 8725c1df7a
commit 7451eb1346
14 changed files with 471 additions and 51 deletions
client/src/api

View file

@ -354,4 +354,22 @@ export default class Api {
};
return this.makeRequest(path, method, parameters);
}
// DNS-over-HTTPS and DNS-over-TLS
TLS_STATUS = { path: 'tls/status', method: 'GET' };
TLS_CONFIG = { path: 'tls/configure', method: 'POST' };
getTlsStatus() {
const { path, method } = this.TLS_STATUS;
return this.makeRequest(path, method);
}
setTlsConfig(config) {
const { path, method } = this.TLS_CONFIG;
const parameters = {
data: config,
headers: { 'Content-Type': 'application/json' },
};
return this.makeRequest(path, method, parameters);
}
}