src/Control/Director.php
public static function absoluteBaseURLWithAuth(HTTPRequest $request = null)
    {
        // Detect basic auth
        $user = $request->getHeader('PHP_AUTH_USER');
        if ($user) {
            $password = $request->getHeader('PHP_AUTH_PW');
            $login = sprintf("%s:%s@", $user, $password) ;
        } else {
            $login = '';
        }

        return Director::protocol($request) . $login . static::host($request) . Director::baseURL();
    }
public static function absoluteBaseURLWithAuth(HTTPRequest $request = null)
    {
        // Detect basic auth
        $user = $request->getHeader('PHP_AUTH_USER');
        if ($user) {
            $password = $request->getHeader('PHP_AUTH_PW');
            $login = sprintf("%s:%s@", $user, $password) ;
        } else {
            $login = '';
        }

        return Director::protocol($request) . $login . static::host($request) . Director::baseURL();
    }
public static function absoluteBaseURLWithAuth ( HTTPRequest $ request = null ) { // Detect basic auth $ user = $ request -> getHeader ( 'PHP_AUTH_USER' ) ; if ( $ user ) { $ password = $ request -> getHeader ( 'PHP_AUTH_PW' ) ; $ login = sprintf ( "%s:%s@" , $ user , $ password ) ; } else { $ login = '' ; } return Director :: protocol ( $ request ) . $ login . static :: host ( $ request ) . Director :: baseURL ( ) ; }
Returns the Absolute URL of the site root, embedding the current basic-auth credentials into
the URL.

@param HTTPRequest|null $request
@return string
Returns the Absolute URL of the site root embedding the current basic - auth credentials into the URL .