mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'mod/presupuesto_admin'
Main See merge request jjimenez/safekat!474
This commit is contained in:
@ -26,6 +26,7 @@ class Filters extends BaseConfig
|
||||
'honeypot' => Honeypot::class,
|
||||
'invalidchars' => InvalidChars::class,
|
||||
'secureheaders' => SecureHeaders::class,
|
||||
'cors' => \App\Filters\Cors::class
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@ -945,14 +945,31 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func
|
||||
*/
|
||||
$routes->post('auth/jwt', '\App\Controllers\Sistema\AuthAPIController::jwtLogin');
|
||||
|
||||
$routes->group('api', ['filter' => 'jwt'], static function ($routes) {
|
||||
$routes->get('test', 'Test::echo');
|
||||
// ...
|
||||
});
|
||||
$routes->group(
|
||||
'api',
|
||||
[
|
||||
'namespace' => 'App\Controllers\API',
|
||||
'filter' => 'jwt'
|
||||
],
|
||||
static function ($routes) {
|
||||
|
||||
$routes->resource('items', [
|
||||
'controller' => 'ItemsController',
|
||||
'filter' => 'cors'
|
||||
]);
|
||||
|
||||
$routes->options('items', static function () { });
|
||||
$routes->options('items/(:any)', static function () { });
|
||||
|
||||
|
||||
|
||||
// ...
|
||||
}
|
||||
);
|
||||
|
||||
/*
|
||||
* --------------------------------------------------------------------
|
||||
* Translation
|
||||
* Translation
|
||||
* --------------------------------------------------------------------
|
||||
*/
|
||||
$routes->group('translate', ['namespace' => 'App\Controllers'], function ($routes) {
|
||||
|
||||
Reference in New Issue
Block a user