settings: move trusted ip setting to reverseproxy
This commit is contained in:
@@ -72,9 +72,6 @@ exports = module.exports = {
|
||||
getFirewallBlocklist,
|
||||
setFirewallBlocklist,
|
||||
|
||||
getTrustedIps,
|
||||
setTrustedIps,
|
||||
|
||||
getGhosts,
|
||||
setGhosts,
|
||||
|
||||
@@ -99,6 +96,9 @@ exports = module.exports = {
|
||||
|
||||
isDemo,
|
||||
|
||||
get,
|
||||
set,
|
||||
|
||||
// booleans. if you add an entry here, be sure to fix list()
|
||||
DYNAMIC_DNS_KEY: 'dynamic_dns',
|
||||
UNSTABLE_APPS_KEY: 'unstable_apps',
|
||||
@@ -230,7 +230,6 @@ const gDefaults = (function () {
|
||||
result[exports.MAIL_FQDN_KEY] = '';
|
||||
|
||||
result[exports.FIREWALL_BLOCKLIST_KEY] = '';
|
||||
result[exports.TRUSTED_IPS_KEY] = '';
|
||||
|
||||
result[exports.API_SERVER_ORIGIN_KEY] = 'https://api.cloudron.io';
|
||||
result[exports.WEB_SERVER_ORIGIN_KEY] = 'https://cloudron.io';
|
||||
@@ -666,19 +665,6 @@ async function setFirewallBlocklist(blocklist) {
|
||||
await setBlob(exports.FIREWALL_BLOCKLIST_KEY, Buffer.from(blocklist));
|
||||
}
|
||||
|
||||
async function getTrustedIps() {
|
||||
const value = await get(exports.TRUSTED_IPS_KEY);
|
||||
if (value === null) return gDefaults[exports.TRUSTED_IPS_KEY];
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
async function setTrustedIps(trustedIps) {
|
||||
assert.strictEqual(typeof trustedIps, 'string');
|
||||
|
||||
await set(exports.TRUSTED_IPS_KEY, trustedIps);
|
||||
}
|
||||
|
||||
async function getGhosts() {
|
||||
const value = await get(exports.GHOSTS_CONFIG_KEY);
|
||||
if (value === null) return gDefaults[exports.GHOSTS_CONFIG_KEY];
|
||||
|
||||
Reference in New Issue
Block a user