{% set hasReachedBody = false %} {% set content = '' %} {% set data = data|split("\n")|slice(1) %} {% set xdebugTokenLink = data|filter(v => 'x-debug-token-link:' in v|lower)|first|split(': ')|last %} {% for row in data %} {% if row is empty %} {% set hasReachedBody = true %} {% elseif hasReachedBody %} {% set content = content ~ "\n" ~ row %} {% else %} {% set row = row|split(':') %} {% set value = row|slice(1)|join(':')|trim %} {% endif %} {% endfor %}
{{ header }}{% if xdebugTokenLink %} Profile link{% endif %}
{{ row[0] }} {% if value matches '#^https?://#' %} {{ value }} {% else %} {{ value }} {% endif %}
{{ content|nl2br ?: '(This message has no captured body)' }}