This commit is contained in:
2020-12-15 17:18:37 +08:00
parent 5fd2d23525
commit 4db46a65ec
+1 -1
View File
@@ -112,7 +112,7 @@ class Controller extends Application
*/ */
public function getHeaders(): ?HttpHeaders public function getHeaders(): ?HttpHeaders
{ {
if (!$this->headers) { if (!$this->headers && $this->getRequest()) {
$this->headers = $this->getRequest()->headers; $this->headers = $this->getRequest()->headers;
} }
return $this->headers; return $this->headers;