function WebprofilerRequestMatcher::matches
File
-
webprofiler/
src/ RequestMatcher/ WebprofilerRequestMatcher.php, line 37
Class
- WebprofilerRequestMatcher
- Class WebprofilerRequestMatcher
Namespace
Drupal\webprofiler\RequestMatcherCode
public function matches(Request $request) {
$path = $request->getPathInfo();
$patterns = $this->configFactory
->get('webprofiler.config')
->get('exclude');
// never add Webprofiler to phpinfo page.
$patterns .= "\r\n/admin/reports/status/php";
// never add Webprofiler to uninstall confirm page.
$patterns .= "\r\n/admin/modules/uninstall/*";
return !$this->pathMatcher
->matchPath($path, $patterns);
}