Browser: Opera
OS: Win 11
URL: request if needed as behind HTTP Auth
Video: Jam
Described in Jam.
Many thanks
Mick
Browser: Opera
OS: Win 11
URL: request if needed as behind HTTP Auth
Video: Jam
Described in Jam.
Many thanks
Mick
Hi Jenn
I hope you are well mate, thanks for the reply. Yes that works and the cron job runs.
The only issue is not being able to do so with HTTP Auth active. I am not sure if there is a workaround or a fixable solution or if it is just not possible whilst HTTP Auth is active?
Many thanks again mate.
Hi @Michael ,
Can you try this snippet with HTTP Auth enabled?
add_filter( 'bricks/remote_post', 'additional_remote_args', 10, 2 );
function additional_remote_args( $args, $url ) {
if ( strpos( $url, 'action=bricks_background_index_job' ) === false ) {
return $args;
}
// Add Basic Auth to the request
$username = 'XXXX';
$password = 'XXXX';
$args['headers']['Authorization'] = 'Basic ' . base64_encode( $username . ':' . $password );
return $args;
}
Otherwise, please send admin credentials to help@bricksbuilder.io and include this forum thread URL as a reference.
Regards,
Jenn
That works perfectly Jenn
Many thanks
Michael
Nice, we just updated the academy as well.
Awesome Jenn, just a suggestion if I may, for the less experienced, I would possibly add in the academy notes to make sure that they replace the xxxx in the code with the username & password of their HTTP Auth credentials.