Skip to content

Commit

Permalink
BcRedirectMainSiteMiddlewareが正常に動作していないため、一旦、利用停止
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Oct 26, 2023
1 parent 28bfebf commit 897b887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,16 @@ class BcRedirectMainSiteMiddleware implements MiddlewareInterface
* @param RequestHandlerInterface $handler
* @return ResponseInterface
* @checked
* @noTodo
*/
public function process(
ServerRequestInterface $request,
RequestHandlerInterface $handler
): ResponseInterface
{
// TODO 対象サイトでの存在確認ができていない
// ルーティング後だと、ルーティングで失敗するので、ルーティング前に実行する必要があるが、
// ルーティング前だと対象サイトでの存在確認ができないため、現在は利用していない。
// ルーティングに組み込むことを検討する
if (Configure::read('BcRequest.isUpdater')) {
return $handler->handle($request);
}
Expand Down
3 changes: 0 additions & 3 deletions plugins/baser-core/src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use BaserCore\Event\BcViewEventDispatcher;
use BaserCore\Middleware\BcAdminMiddleware;
use BaserCore\Middleware\BcFrontMiddleware;
use BaserCore\Middleware\BcRedirectMainSiteMiddleware;
use BaserCore\Middleware\BcRedirectSubSiteMiddleware;
use BaserCore\Middleware\BcRequestFilterMiddleware;
use BaserCore\ServiceProvider\BcServiceProvider;
Expand All @@ -46,7 +45,6 @@
use Cake\I18n\I18n;
use Cake\Log\Log;
use Cake\ORM\TableRegistry;
use Cake\Routing\Middleware\RoutingMiddleware;
use Cake\Routing\RouteBuilder;
use Cake\Routing\Router;
use Cake\Utility\Inflector;
Expand Down Expand Up @@ -282,7 +280,6 @@ public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue
$middlewareQueue
->prepend(new BcRequestFilterMiddleware())
->insertBefore(CsrfProtectionMiddleware::class, new AuthenticationMiddleware($this))
->insertBefore(RoutingMiddleware::class, new BcRedirectMainSiteMiddleware())
->add(new BcAdminMiddleware())
->add(new BcFrontMiddleware())
->add(new BcRedirectSubSiteMiddleware());
Expand Down

0 comments on commit 897b887

Please sign in to comment.