Skip to content

Commit

Permalink
fix: panel redirect target
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Jan 15, 2024
1 parent b9c2ccc commit 9961f8d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/classes/Api/Middlewares.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace JohannSchopplich\Headless\Api;

use Kirby\Cms\App;
use Kirby\Panel\Panel;
use Kirby\Exception\NotFoundException;
use Kirby\Filesystem\F;
use Kirby\Http\Response;
Expand Down Expand Up @@ -224,7 +225,7 @@ public static function hasBearerToken()
$authorization = $kirby->request()->header('Authorization');

if ($kirby->option('headless.panel.redirect', false) && empty($authorization)) {
go($kirby->option('panel.slug'));
go(Panel::url());
}

if (
Expand Down

0 comments on commit 9961f8d

Please sign in to comment.