ch11.7
This commit is contained in:
@@ -17,7 +17,7 @@ func (app *application) routes() http.Handler {
|
||||
fileServer := http.FileServer(http.Dir("./ui/static/"))
|
||||
router.Handler(http.MethodGet, "/static/*filepath", http.StripPrefix("/static", fileServer))
|
||||
|
||||
dynamic := alice.New(app.sessionManager.LoadAndSave)
|
||||
dynamic := alice.New(app.sessionManager.LoadAndSave, noSurf)
|
||||
|
||||
router.Handler(http.MethodGet, "/", dynamic.ThenFunc(app.home))
|
||||
router.Handler(http.MethodGet, "/snippet/view/:id", dynamic.ThenFunc(app.snippetView))
|
||||
|
||||
Reference in New Issue
Block a user