Skip to content

Commit ee62ca4

Browse files
committed
update Program class
1 parent b8ef68c commit ee62ca4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Program.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ public static function main(array $args = [])
1616
$builder->configureServices(function ($services) {
1717
$services->addMvc();
1818
$services->addAntiforgery();
19-
$services->addAuthentication();
20-
$services->addAuthorisation();
19+
$services->addAuthentication(function ($builder) {
20+
$builder->addCookie();
21+
});
22+
23+
$services->addAuthorization();
2124
});
2225

2326
$host = $builder->build();
@@ -33,7 +36,7 @@ public static function main(array $args = [])
3336
$app->useAuthentication();
3437

3538
$app->useEndpoint(function ($routes) {
36-
$routes->mapRoute("default", "{controller=Home}/{action=Index}/{id?}");
39+
$routes->mapRoute("{controller=Home}/{action=Index}/{id?}");
3740
});
3841
});
3942
}

0 commit comments

Comments
 (0)