|
16 | 16 | $currentURL = (isset($_SERVER['HTTPS']) ? "https" : "http") . '://' . $_SERVER['HTTP_HOST'] . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); |
17 | 17 |
|
18 | 18 | $app['twig']->addGlobal('currenturl', $currentURL); |
| 19 | +$app['debug'] = true; |
19 | 20 |
|
20 | 21 | $app['images'] = function () use ($app) { |
21 | 22 | return new Images($app); |
|
46 | 47 | } |
47 | 48 | $app['images']->serve($width, $height, '', $request); |
48 | 49 | }) |
49 | | -->assert('width', '\d+'); |
50 | | -->assert('height', '\d+'); |
| 50 | +->assert('width', '[\d]*') |
| 51 | +->assert('height', '[\d]*'); |
51 | 52 |
|
52 | 53 | $app->get('/{width}', function($width) use($app) { |
53 | 54 | $app->redirect("/$width/$width", 303); |
54 | 55 | }) |
55 | | -->assert('width', '\d+'); |
| 56 | +->assert('width', '[\d]*'); |
56 | 57 |
|
57 | 58 | $app->get('/{width}/{height}/{person}', function($width, $height, $person, Request $request) use($app) { |
58 | 59 | if($width > 3000 || $height > 3000) { |
|
61 | 62 | } |
62 | 63 | $app['images']->serve($width, $height, $person, $request); |
63 | 64 | }) |
64 | | -->assert('width', '\d+') |
65 | | -->assert('height', '\d+'); |
| 65 | +->assert('width', '[\d]*') |
| 66 | +->assert('height', '[\d]*'); |
66 | 67 |
|
67 | 68 | // Attribution |
68 | 69 | $app->get('/attribution', function() use($app) { |
|
0 commit comments