$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);
$block_manager = \Drupal::service('plugin.manager.block');
sub vcl_recv { | |
if (! req.http.Authorization ~ "Basic dXNlcm5hbWU6cGFzc3dvcmQ=") { | |
# This is checking for base64 encoded username:password combination | |
return(synth(401, "Authentication required")); | |
} | |
unset req.http.Authorization; | |
} |