Skip to content

Commit

Permalink
feature #28936 [WebProfilerBundle] Replay referer URL (ro0NL)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.2-dev branch.

Discussion
----------

[WebProfilerBundle] Replay referer URL

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26226
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

For non GET/HEAD requests (e.g. POST) that have a referer URL; allow to replay it. And thereby fix the missing navigation piece to get back to your application.

Default

![image](https://user-images.githubusercontent.com/1047696/47259042-3c86ea80-d4a4-11e8-99f7-c3941beaa72c.png)

On hover

![image](https://user-images.githubusercontent.com/1047696/47259048-54f70500-d4a4-11e8-9e44-e20121f5b04f.png)

Commits
-------

9020d49 [WebProfilerBundle] Replay referer URL
  • Loading branch information
fabpot committed Oct 21, 2018
2 parents efa4f16 + 9020d49 commit 316e95c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Expand Up @@ -16,6 +16,10 @@
<a href="{{ profile.url }}">{{ profile.url }}</a>
{% else %}
{{ profile.url }}
{% set referer = profile.collector('request').requestheaders.get('referer') %}
{% if referer %}
<a href="{{ referer }}" class="referer">Replay referer URL</a>
{% endif %}
{% endif %}
</h2>

Expand Down
Expand Up @@ -585,10 +585,19 @@ tr.status-warning td {
font-size: 21px;
margin: 0;
text-decoration: none;
vertical-align: middle;
}
#summary h2 a:hover {
text-decoration: underline;
}
#summary h2 a.referer {
margin-left: .5em;
font-size: 75%;
color: rgba(255, 255, 255, 0.5);
}
#summary h2 a.referer:before {
content: '\1F503\00a0';
}

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

0 comments on commit 316e95c

Please sign in to comment.