Commit 6a441413 authored by Kevin Duret's avatar Kevin Duret
Browse files

fix(kb): fix kb links in resource status (#10781)

Refs: MON-12517
parent 50536342
......@@ -1027,14 +1027,12 @@ class MonitoringResourceController extends AbstractController
/**
* Endpoint: Replaces macros in the URL provided and redirect to it.
*
* @param Request $request
* @param int $hostId
* @param int|null $serviceId
* @param string $urlType
* @return View
*/
public function redirectResourceExternalLink(
Request $request,
int $hostId,
?int $serviceId,
string $urlType
......@@ -1069,6 +1067,9 @@ class MonitoringResourceController extends AbstractController
}
}
// replace relative url by absolute url
$redirectUrl = preg_replace('/^(\.\/)/', $this->getBaseUri() . '/', $redirectUrl);
return View::createRedirect($redirectUrl);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment