fix: add Tauri origins to CSRF allowlist
This commit is contained in:
+4
-1
@@ -163,7 +163,10 @@ func main() {
|
||||
r.Group(func(r chi.Router) {
|
||||
r.Use(middleware.Session(sessionStore, cfg))
|
||||
r.Use(middleware.RequireAuth)
|
||||
r.Use(middleware.CSRFProtect(cfg.Host, cfg.Port, strings.Split(os.Getenv("DUMPSTER_CSRF_ORIGINS"), ",")))
|
||||
r.Use(middleware.CSRFProtect(cfg.Host, cfg.Port, append(
|
||||
strings.Split(os.Getenv("DUMPSTER_CSRF_ORIGINS"), ","),
|
||||
"tauri://localhost", "http://tauri.localhost", "https://tauri.localhost",
|
||||
)))
|
||||
|
||||
// Auth (protected: me, update profile)
|
||||
authHandler.RegisterProtectedRoutes(r)
|
||||
|
||||
Reference in New Issue
Block a user