Skip to content

Commit 593dc1b

Browse files
committed
feat: add support for request headers
1 parent 7318830 commit 593dc1b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Headers.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public static function resetStatus($httpCode = 200)
4545
*/
4646
public static function all(bool $safeOutput = false): array
4747
{
48+
if (class_exists('Leaf\Eien\Server') && PHP_SAPI === 'cli') {
49+
return \Leaf\Config::get('request.headers');
50+
}
51+
4852
return ($safeOutput === false) ?
4953
self::findHeaders() :
5054
\Leaf\Anchor::sanitize(self::findHeaders());

0 commit comments

Comments
 (0)