Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CSRF token to all internal session-authenticated API requests.
- Loading branch information
1 parent
95a9b8c
commit 5a2f1a4
Showing
50 changed files
with
17,890 additions
and
7,952 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
<?php | ||
|
||
use App\Middleware; | ||
use Slim\App; | ||
use Slim\Routing\RouteCollectorProxy; | ||
|
||
return function (App $app) { | ||
|
||
call_user_func(include(__DIR__ . '/routes/admin.php'), $app); | ||
call_user_func(include(__DIR__ . '/routes/api.php'), $app); | ||
call_user_func(include(__DIR__ . '/routes/base.php'), $app); | ||
call_user_func(include(__DIR__ . '/routes/public.php'), $app); | ||
call_user_func(include(__DIR__ . '/routes/stations.php'), $app); | ||
return static function (App $app) { | ||
$app->group( | ||
'', | ||
function (RouteCollectorProxy $group) { | ||
call_user_func(include(__DIR__ . '/routes/admin.php'), $group); | ||
call_user_func(include(__DIR__ . '/routes/base.php'), $group); | ||
call_user_func(include(__DIR__ . '/routes/public.php'), $group); | ||
call_user_func(include(__DIR__ . '/routes/stations.php'), $group); | ||
} | ||
)->add(Middleware\Auth\StandardAuth::class); | ||
|
||
$app->group( | ||
'', | ||
function (RouteCollectorProxy $group) { | ||
call_user_func(include(__DIR__ . '/routes/api.php'), $group); | ||
} | ||
)->add(Middleware\Auth\ApiAuth::class); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.