Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
samples
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Χάρης Παπαδόπουλος
samples
Commits
baf22c7a
Commit
baf22c7a
authored
Feb 15, 2017
by
Σταύρος Παπαδάκης
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add trailing slash to routes
parent
c2929587
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
amka/slim-app/src/middleware.php
amka/slim-app/src/middleware.php
+6
-0
amka/slim-app/src/routes.php
amka/slim-app/src/routes.php
+4
-2
No files found.
amka/slim-app/src/middleware.php
View file @
baf22c7a
...
@@ -7,6 +7,12 @@ $password = isset($settings['amka']['secure_endpoint_password']) ? $settings['am
...
@@ -7,6 +7,12 @@ $password = isset($settings['amka']['secure_endpoint_password']) ? $settings['am
// Application middleware
// Application middleware
// e.g: $app->add(new \Slim\Csrf\Guard);
// 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'
)
$app
->
getContainer
()
->
get
(
'router'
)
->
getNamedRoute
(
'amka'
)
->
getNamedRoute
(
'amka'
)
->
add
(
new
Gr\Gov\Minedu\Osteam\Slim\AuthorizationGuard
(
$username
,
$password
));
->
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
));
amka/slim-app/src/routes.php
View file @
baf22c7a
<?php
<?php
$app
->
get
(
'/amka/{amka}/{surname}[/{extended}]'
,
'\Gr\Gov\Minedu\Osteam\Slim\App:validateAmka'
)
$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'
);
->
setName
(
'amka'
);
$app
->
get
(
'/amka/{amka}'
,
'\Gr\Gov\Minedu\Osteam\Slim\App:isAmka'
)
$app
->
get
(
'/amka/{amka}
[/]
'
,
'\Gr\Gov\Minedu\Osteam\Slim\App:isAmka'
)
->
setName
(
'amka'
);
->
setName
(
'amka
s
'
);
$app
->
any
(
'/[{anythingelse}]'
,
function
(
$request
,
$response
,
$args
)
{
$app
->
any
(
'/[{anythingelse}]'
,
function
(
$request
,
$response
,
$args
)
{
$this
->
logger
->
info
(
"Void response, no action route was enabled"
);
$this
->
logger
->
info
(
"Void response, no action route was enabled"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment