Closed panaceya closed 8 years ago
please check your baseUri config.
All settings correct
value baseUri set to '/' in my config.ini, and file app/config/services.php have this content:
$di->set('url', function() use ($config){
$url = new Phalcon\Mvc\Url();
$url->setBaseUri($config->application->baseUri);
return $url;
});
Check your web server config.
This is my demo source : https://git.coding.net/snowair/invo.git
You can edit index.php and loader.php of this demo for your test.
Demo source from https://git.coding.net/snowair/invo.git worked nicely.
app/plugins/SecurityPlugin.php :
public function beforeDispatch(Event $event, Dispatcher $dispatcher)
{
$auth = $this->session->get('auth');
if (!$auth){
$role = 'Guests';
} else {
$role = 'Users';
}
$controller = $dispatcher->getControllerName();
$action = $dispatcher->getActionName();
$ns = $dispatcher->getNamespaceName();
if ($ns=='Snowair\Debugbar\Controllers') {
return true;
}
$acl = $this->getAcl();
$allowed = $acl->isAllowed($role, $controller, $action);
if ($allowed != Acl::ALLOW) {
$dispatcher->forward(array(
'controller' => 'errors',
'action' => 'show401'
));
$this->session->destroy();
return false;
}
}
I use default INVO with your plug-in, but receive errors:
my public.index.php
my app/confing/loader.php
Any ideas?