Add trailing slash to routes

parent c2929587
......@@ -7,6 +7,12 @@ $password = isset($settings['amka']['secure_endpoint_password']) ? $settings['am
// Application middleware
// e.g: $app->add(new \Slim\Csrf\Guard);
$app->getContainer()->get('router')
->getNamedRoute('amkaext')
->add(new Gr\Gov\Minedu\Osteam\Slim\AuthorizationGuard($username, $password));
$app->getContainer()->get('router')
->getNamedRoute('amka')
->add(new Gr\Gov\Minedu\Osteam\Slim\AuthorizationGuard($username, $password));
$app->getContainer()->get('router')
->getNamedRoute('amkas')
->add(new Gr\Gov\Minedu\Osteam\Slim\AuthorizationGuard($username, $password));
<?php
$app->get('/amka/{amka}/{surname}[/{extended}]', '\Gr\Gov\Minedu\Osteam\Slim\App:validateAmka')
->setName('amkaext');
$app->get('/amka/{amka}/{surname}/', '\Gr\Gov\Minedu\Osteam\Slim\App:validateAmka')
->setName('amka');
$app->get('/amka/{amka}', '\Gr\Gov\Minedu\Osteam\Slim\App:isAmka')
->setName('amka');
$app->get('/amka/{amka}[/]', '\Gr\Gov\Minedu\Osteam\Slim\App:isAmka')
->setName('amkas');
$app->any('/[{anythingelse}]', function ($request, $response, $args) {
$this->logger->info("Void response, no action route was enabled");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment