diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 181ddda102..bd9f94b35f 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -806,8 +806,15 @@ //build content for linphone if ($device_template == "linphone/default") { - $content = "https://".$_SESSION['domain_name'].'/app/provision/index.php?address='.$device_address; - //$content = "https://".$_SESSION['domain_name'].'/'.$device_address.'.xml'; + if ( + !empty($_SESSION['provision']['http_auth_enabled']['boolean']) && + $_SESSION['provision']['http_auth_enabled']['boolean'] == 'true' && + !empty($_SESSION['provision']['http_auth_username']['text']) && + !empty($_SESSION['provision']['http_auth_password'][0]) + ) { + $auth_string = $_SESSION['provision']['http_auth_username']['text'].':'.$_SESSION['provision']['http_auth_password'][0].'@'; + } + $content = "https://".$auth_string.$_SESSION['domain_name'].'/app/provision/index.php?address='.$device_address; } //stream the file @@ -836,52 +843,46 @@ //html image if (!empty($content) && !empty($image)) { echo "\n"; echo "\n"; echo ""; - echo "