Add REQUEST_METHOD to log

This commit is contained in:
Visman 2023-07-25 17:26:20 +07:00
parent d0ab8a4555
commit eb3c6256da

View file

@ -122,9 +122,12 @@ class Log implements LoggerInterface
if (true === $ext) {
foreach ($_SERVER as $key => $value) {
if (
\str_starts_with($key, 'HTTP_')
&& 'HTTP_USER_AGENT' !== $key
&& 'HTTP_COOKIE' !== $key
'REQUEST_METHOD' === $key
|| (
\str_starts_with($key, 'HTTP_')
&& 'HTTP_USER_AGENT' !== $key
&& 'HTTP_COOKIE' !== $key
)
) {
$headers[$key] = $value;
}