From 13ee1fa2b7be83e77cd9d3ebdd44da747b1999fe Mon Sep 17 00:00:00 2001 From: martijn Date: Wed, 1 May 2019 18:49:52 +0200 Subject: [PATCH] Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler. --- .../Bundle/WebProfilerBundle/Controller/ProfilerController.php | 2 +- .../Resources/views/Profiler/toolbar_item.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 4333c74d2ff8..55f343806aff 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -164,7 +164,7 @@ public function toolbarAction(Request $request, $token) $url = null; try { - $url = $this->generator->generate('_profiler', ['token' => $token]); + $url = $this->generator->generate('_profiler', ['token' => $token], UrlGeneratorInterface::ABSOLUTE_URL); } catch (\Exception $e) { // the profiler is not enabled } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig index 69872418cfb2..d81e87797766 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig @@ -1,5 +1,5 @@
- {% if link is not defined or link %}{% endif %} + {% if link is not defined or link %}{% endif %}
{{ icon|default('') }}
{% if link|default(false) %}
{% endif %}
{{ text|default('') }}