Skip to content

Commit

Permalink
BUGFIX: Check for node befor accessing its properties
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert committed Jan 14, 2021
1 parent 25dae20 commit 930aab8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Classes/Middleware/CacheControlHeaderComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
return $response;
}

if (!$node instanceof NodeInterface) {
return $response;
}

if ($node->getContext()->getWorkspaceName() !== 'live') {
return $response;
}
Expand Down

0 comments on commit 930aab8

Please sign in to comment.