ch14.4
This commit is contained in:
@@ -19,6 +19,8 @@ func (app *application) routes() http.Handler {
|
||||
fileServer := http.FileServer(http.FS(ui.Files))
|
||||
router.Handler(http.MethodGet, "/static/*filepath", fileServer)
|
||||
|
||||
router.HandlerFunc(http.MethodGet, "/ping", ping)
|
||||
|
||||
dynamic := alice.New(app.sessionManager.LoadAndSave, noSurf, app.authenticate)
|
||||
|
||||
router.Handler(http.MethodGet, "/", dynamic.ThenFunc(app.home))
|
||||
|
||||
Reference in New Issue
Block a user