1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

PWA: Prevent passing credentials to avoid redirection issues

For #4649
More of a patch around the issue for now.
Have opened #4656 to properly address.
This commit is contained in:
Dan Brown
2023-11-07 14:33:37 +00:00
parent 889b0dae3b
commit ea0469e61a
3 changed files with 7 additions and 4 deletions

View File

@@ -6,6 +6,11 @@ class PwaManifestBuilder
{
public function build(): array
{
// Note, while we attempt to use the user's preference here, the request to the manifest
// does not start a session, so we won't have current user context.
// This was attempted but removed since manifest calls could affect user session
// history tracking and back redirection.
// Context: https://github.com/BookStackApp/BookStack/issues/4649
$darkMode = (bool) setting()->getForCurrentUser('dark-mode-enabled');
$appName = setting('app-name');