mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 02:58:57 -05:00
Merge pull request #1690 from unraid/proxy-via-localprepend
Proxy via local_prepend.php
This commit is contained in:
@@ -39,4 +39,8 @@ if ($_SERVER['SCRIPT_NAME'] != '/login.php' && $_SERVER['SCRIPT_NAME'] != '/auth
|
||||
if ($var['csrf_token'] != $_POST['csrf_token']) csrf_terminate("wrong");
|
||||
unset($_POST['csrf_token']);
|
||||
}
|
||||
$proxy_cfg = (array)@parse_ini_file('/var/local/emhttp/proxy.ini',true);
|
||||
putenv('http_proxy='.((array_key_exists('http_proxy', $proxy_cfg)) ? $proxy_cfg['http_proxy'] : ''));
|
||||
putenv('https_proxy='.((array_key_exists('https_proxy', $proxy_cfg)) ? $proxy_cfg['https_proxy'] : ''));
|
||||
putenv('no_proxy='.((array_key_exists('http_proxy', $proxy_cfg)) ? $proxy_cfg['no_proxy'] : ''));
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user