summaryrefslogtreecommitdiffstats
path: root/modules-available/webinterface/inc/webinterface.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/webinterface/inc/webinterface.inc.php')
-rw-r--r--modules-available/webinterface/inc/webinterface.inc.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules-available/webinterface/inc/webinterface.inc.php b/modules-available/webinterface/inc/webinterface.inc.php
index d50acd50..2541ea24 100644
--- a/modules-available/webinterface/inc/webinterface.inc.php
+++ b/modules-available/webinterface/inc/webinterface.inc.php
@@ -11,6 +11,8 @@ class WebInterface
public const PROP_API_KEY = 'webinterface.api-key';
+ public const PROP_PROXIES_TRUSTED = 'webinterface.proxies-trusted';
+
/**
* Read data all handled domains from current certificate.
* SAN takes precedence, if empty, we fall back to CN.
@@ -139,4 +141,20 @@ class WebInterface
Property::set(self::PROP_API_KEY, empty($key) ? null : $key);
}
+ /**
+ * List of trusted proxies. Key is the IP address, value is optional comment.
+ */
+ public static function getProxiesTrusted(): array
+ {
+ return Property::get(self::PROP_PROXIES_TRUSTED, []);
+ }
+
+ /**
+ * Set list of trusted proxies. Key is the IP address, value is optional comment.
+ */
+ public static function setProxiesTrusted(array $proxies): void
+ {
+ Property::set(self::PROP_PROXIES_TRUSTED, $proxies);
+ }
+
} \ No newline at end of file