8000 [WebProfilerBundle] Replay referer URL · symfony/symfony@9020d49 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9020d49

Browse files
committed
[WebProfilerBundle] Replay referer URL
1 parent 4d757b5 commit 9020d49

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
<a href="{{ profile.url }}">{{ profile.url }}</a>
1717
{% else %}
1818
{{ profile.url }}
19+
{% set referer = profile.collector('request').requestheaders.get('referer') %}
20+
{% if referer %}
21+
<a href="{{ referer }}" class="referer">Replay referer URL</a>
22+
{% endif %}
1923
{% endif %}
2024
</h2>
2125

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,19 @@ tr.status-warning td {
585585
font-size: 21px;
586586
margin: 0;
587587
text-decoration: none;
588+
vertical-align: middle;
588589
}
589590
#summary h2 a:hover {
590591
text-decoration: underline;
591592
}
593+
#summary h2 a.referer {
594+
margin-left: .5em;
595+
font-size: 75%;
596+
color: rgba(255, 255, 255, 0.5);
597+
}
598+
#summary h2 a.referer:before {
599+
content: '\1F503\00a0';
600+
}
592601

593602
#summary .status-success { background: var(--color-success); }
594603
#summary .status-warning { background: var(--color-warning); }

0 commit comments

Comments
 (0)
0