* cors and other basic changes
This commit is contained in:
@@ -14,6 +14,7 @@ use Zend\Stratigility\Middleware\ErrorHandler;
|
||||
// The error handler should be the first (most outer) middleware to catch
|
||||
// all Exceptions.
|
||||
$app->pipe(ErrorHandler::class);
|
||||
$app->pipe(App\Middleware\PreFlightMiddleware::class);
|
||||
$app->pipe(ServerUrlMiddleware::class);
|
||||
|
||||
// Pipe more middleware here that you want to execute on every request:
|
||||
|
||||
@@ -29,4 +29,4 @@
|
||||
$app->get('/', App\Action\HomePageAction::class, 'home');
|
||||
$app->get('/api/galleries', App\Action\ListGalleriesAction::class, 'api.galleries');
|
||||
$app->get('/api/gallery/{slug}', App\Action\GetGalleryImagesAction::class, 'api.gallery');
|
||||
$app->get('/api/image/{slug}/{image}[/{thumb}]', App\Action\GetImageAction::class, 'api.image');
|
||||
$app->get('/image/{slug}/{image}[/{thumb}]', App\Action\GetImageAction::class, 'download.image');
|
||||
|
||||
Reference in New Issue
Block a user