added new radius module

This commit is contained in:
Luca Haid
2025-01-14 09:10:24 +01:00
parent 35e5040155
commit 08b4c27c5d
2 changed files with 22 additions and 21 deletions
+17
View File
@@ -19,4 +19,21 @@ class RadiusController extends mfBaseController {
}
protected function proxyUnsecureHTTPRequestToRadiusAction() {
$url = "http://radius.xinon.at/api.php?" . http_build_query($_GET);
$url = str_replace("proxyUnsecureHTTPRequestToRadius", "", $url);
$opts = [
"http" => [
"method" => "GET",
"header" => "Authorization: Basic " . base64_encode("admin:saveman"),
]
];
header("Content-Type: application/json");
$context = stream_context_create($opts);
$response = file_get_contents($url, false, $context);
echo $response;
die();
}
}