Use ungrouped CSRF middleware on register and login POST routes
This commit is contained in:
@ -3,6 +3,7 @@ package routes
|
||||
import (
|
||||
"GoWeb/app"
|
||||
"GoWeb/controllers"
|
||||
"GoWeb/middleware"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -14,6 +15,6 @@ func PostRoutes(app *app.App) {
|
||||
}
|
||||
|
||||
// User authentication
|
||||
http.HandleFunc("/register-handle", postController.Register)
|
||||
http.HandleFunc("/login-handle", postController.Login)
|
||||
http.HandleFunc("/register-handle", middleware.CsrfMiddleware(postController.Register))
|
||||
http.HandleFunc("/login-handle", middleware.CsrfMiddleware(postController.Login))
|
||||
}
|
||||
|
Reference in New Issue
Block a user