updated
This commit is contained in:
+3
-5
@@ -15,11 +15,9 @@ func SetupRoutes(router *mux.Router, db *sql.DB) {
|
||||
router.HandleFunc("/ready", handlers.ReadyHandler).Methods("GET")
|
||||
|
||||
authRoutes := router.PathPrefix("/v1/auth").Subrouter()
|
||||
frontendOnly := authRoutes.NewRoute().Subrouter()
|
||||
frontendOnly.Use(middleware.FrontendOriginWhitelist)
|
||||
frontendOnly.HandleFunc("/login", handlers.GoogleLogin).Methods("GET")
|
||||
frontendOnly.HandleFunc("/forgot-password", handlers.ForgotPassword).Methods("GET")
|
||||
frontendOnly.HandleFunc("/callback", handlers.GoogleCallback).Methods("GET")
|
||||
authRoutes.HandleFunc("/login", handlers.GoogleLogin).Methods("GET")
|
||||
authRoutes.HandleFunc("/forgot-password", handlers.ForgotPassword).Methods("GET")
|
||||
authRoutes.HandleFunc("/callback", handlers.GoogleCallback).Methods("GET")
|
||||
|
||||
csrfProtected := authRoutes.NewRoute().Subrouter()
|
||||
csrfProtected.Use(middleware.CSRFMiddleware)
|
||||
|
||||
Reference in New Issue
Block a user