Skip to content

Commit 7c5dbce

Browse files
committed
display incoming http headers
1 parent 803a25e commit 7c5dbce

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

resources/views/index.blade.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,27 @@ class="bg-white mb-4 p-4 rounded-lg"
4242
<div x-show="!isLoading" x-html="message" class="max-h-72 overflow-y-auto"></div>
4343
</div>
4444
@endforeach
45+
46+
<div class="bg-white mb-4 p-4 rounded-lg">
47+
<h2 class="text-lg font-bold mb-2">Incoming HTTP Headers</h2>
48+
<div class="bg-gray-50 p-3 rounded max-h-96 overflow-y-auto">
49+
<table class="w-full text-sm font-mono">
50+
<tbody>
51+
@foreach (request()->headers->all() as $header => $values)
52+
<tr class="border-b border-gray-200">
53+
<td class="py-2 pr-4 font-semibold text-gray-700 align-top">{{ e($header) }}</td>
54+
<td class="py-2 text-gray-600">
55+
@foreach ($values as $value)
56+
<div>{{ e($value) }}</div>
57+
@endforeach
58+
</td>
59+
</tr>
60+
@endforeach
61+
</tbody>
62+
</table>
63+
</div>
64+
</div>
65+
4566
<h2 class="text-lg font-bold">Additional test tools</h2>
4667
<ul>
4768
<li class="mt-2 flex">

0 commit comments

Comments
 (0)