Skip to content

Commit

Permalink
FIX Logout bug on shared preview page
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Jun 8, 2022
1 parent 342e059 commit e465937
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Controllers/ShareDraftController.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ private function getRenderedPageByURL(string $url): HTTPResponse
$variables = HTTPRequestBuilder::cleanEnvironment(Environment::getVariables());
$variables['_SERVER']['REQUEST_URI'] = $url;
$variables['_SERVER']['REQUEST_METHOD'] = 'GET';
$variables['_SERVER']['HTTP_USER_AGENT'] = 'CLI';
$variables['_SERVER']['HTTP_USER_AGENT'] =
isset($variables['_SERVER']['HTTP_USER_AGENT']) &&
$variables['_SERVER']['HTTP_USER_AGENT']
? $variables['_SERVER']['HTTP_USER_AGENT']
: 'CLI';

Environment::setVariables($variables);

Expand Down

0 comments on commit e465937

Please sign in to comment.