/**
 * Implements hook_hal_relation_uri_alter().
 */
function {{ machine_name }}_hal_relation_uri_alter(&$uri, $context = []) {
  if ($context['mymodule'] == TRUE) {
    $base = \Drupal::config('hal.settings')->get('link_domain');
    $uri = str_replace($base, 'http://mymodule.domain', $uri);
  }
}
