30 new \ilSettingsFactoryExistsObjective()
36 $ilias_ini = $environment->getResource(
Setup\Environment::RESOURCE_ILIAS_INI);
39 $storage->storeConfigText(
41 $ilias_ini->readVariable(
"server",
"http_path"),
44 $storage->storeConfigText(
46 $ilias_ini->readVariable(
"https",
"forced"),
50 if ($ilias_ini->readVariable(
"https",
"auto_https_detect_enabled")) {
52 Setup\Metrics\Metric::STABILITY_CONFIG,
53 Setup\Metrics\Metric::TYPE_TEXT,
54 $ilias_ini->readVariable(
"https",
"auto_https_detect_header_name"),
55 "The name of the header used for https detection in requests."
58 Setup\Metrics\Metric::STABILITY_CONFIG,
59 Setup\Metrics\Metric::TYPE_TEXT,
60 $ilias_ini->readVariable(
"https",
"auto_https_detect_header_value"),
61 "The value in the named header that indicates usage of https in requests."
64 Setup\Metrics\Metric::STABILITY_CONFIG,
65 Setup\Metrics\Metric::TYPE_COLLECTION,
67 "header_name" => $header_name,
68 "header_value" => $header_value
70 "The properties of a request used for https detection."
72 $storage->store(
"https_autodetection", $https_metrics);
74 $storage->storeConfigBool(
75 "https_autodetection",
77 "Does the server attempt to detect https in incoming requests?"
82 $factory = $environment->getResource(
Setup\Environment::RESOURCE_SETTINGS_FACTORY);
86 $settings = $factory->settingsFor(
"common");
88 if ($settings->get(
"proxy_status")) {
90 Setup\Metrics\Metric::STABILITY_CONFIG,
91 Setup\Metrics\Metric::TYPE_TEXT,
92 $settings->get(
"proxy_host"),
93 "The host of the proxy."
96 Setup\Metrics\Metric::STABILITY_CONFIG,
97 Setup\Metrics\Metric::TYPE_TEXT,
98 $settings->get(
"proxy_port"),
99 "The port of the proxy."
102 Setup\Metrics\Metric::STABILITY_CONFIG,
103 Setup\Metrics\Metric::TYPE_COLLECTION,
108 "The proxy that is used for outgoing connections."
110 $storage->store(
"proxy", $proxy);
112 $storage->storeConfigBool(
115 "Does the server use a proxy for outgoing connections?"
119 if ($settings->get(
'allowed_hosts')) {
123 Setup\Metrics\Metric::STABILITY_CONFIG,
124 Setup\Metrics\Metric::TYPE_COLLECTION,
126 static fn(
string $host) =>
new Setup\Metrics\
Metric(
127 Setup\Metrics\Metric::STABILITY_CONFIG,
128 Setup\Metrics\Metric::TYPE_TEXT,
131 explode(
',', $settings->get(
'allowed_hosts'))
133 'Collection of configured allowed hosts.'
A metric is something we can measure about the system.
getTentativePreconditions(Setup\Environment $environment)
collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage)
An environment holds resources to be used in the setup process.
Storage is simple key/value store without further schema definition.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...