add code for testing wildcard routes

This commit is contained in:
Uwe Steinmann 2020-01-28 08:15:23 +01:00
parent b07b94b59a
commit 2e2ca3cc6a

View File

@ -60,6 +60,21 @@ if(true) {
}
}
/*
$app->get('/out/[{path:.*}]', function($request, $response, $path = null) use ($app) {
$uri = $request->getUri();
if($uri->getBasePath())
$file = $uri->getPath();
else
$file = substr($uri->getPath(), 1);
if(file_exists($file) && is_file($file)) {
$_SERVER['SCRIPT_FILENAME'] = basename($file);
include($file);
exit;
}
});
*/
$app->run();
} else {