cakephp - fullBaseUrl not properly works with AuthComponent -
recenty i've moved application subdirectory i've configured fullbaseurl this:
configure::write('app.fullbaseurl', 'https://example.com/subdirectory');
nothing more changed in app , works perfect, except 1 thing - accessing unauthorized locations.
i've defined this:
$this->auth->loginaction = ['controller' => 'app_users', 'action' => 'login', 'admin' => false]; $this->auth->loginredirect = ['controller' => 'dashboard', 'action' => 'index', 'admin' => false]; $this->auth->logoutredirect = ['controller' => 'app_users', 'action' => 'login', 'admin' => false]; $this->auth->unauthorizedredirect = ['controller' => 'dashboard', 'action' => 'index', 'admin' => false];
thus logged users when try access unauthorized action redirected their's dashboard, users not logged in should redirected login form.
but after moving app subdirectory , defining fullbaseurl unauthorized locations i'm getting redirect this:
https://example.com/subdirectory/subdirectory/app_users/login
this bug fixed. available in next bugfix release 2.7 series. if need right away use 2.7 git branch.
Comments
Post a Comment