reverseproxy: move renew and trusted ip routes

This commit is contained in:
Girish Ramakrishnan
2023-08-04 13:19:48 +05:30
parent a49cb0b080
commit 1264cd1dd7
8 changed files with 64 additions and 47 deletions

View File

@@ -1148,7 +1148,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.getTrustedIps = function (callback) {
get('/api/v1/network/trusted_ips', null, function (error, data, status) {
get('/api/v1/reverseproxy/trusted_ips', null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.trustedIps);
@@ -1156,7 +1156,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.setTrustedIps = function (trustedIps, callback) {
post('/api/v1/network/trusted_ips', { trustedIps: trustedIps }, null, function (error, data, status) {
post('/api/v1/reverseproxy/trusted_ips', { trustedIps: trustedIps }, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
@@ -2765,7 +2765,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.renewCerts = function (options, callback) {
post('/api/v1/cloudron/renew_certs', options, null, function (error, data, status) {
post('/api/v1/reverseproxy/renew_certs', options, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));