Stop allowing cross-origin requests (closes #261)
check / check (push) Failing after 4s

The CORS middleware let every origin make credentialed requests, so a
page on another subdomain of the server's domain could read and act as
the signed-in user. Nothing needs cross-origin access, so the
middleware and the go-chi/cors dependency go. A test checks that a
request from another origin and a preflight get no
Access-Control-Allow-* headers.

Model: opus-5-5
This commit is contained in:
clawbot committed 2026-11-10 21:50:10 +00:00
1 parent f42c6214a0
commit 3587ce92cd
6 files changed
+74 -39

No files matched your search

-1
View File
@@ -30,7 +30,6 @@ func (srv *Server) SetupRoutes() {
srv.router.Use(srv.mw.Metrics())
}
srv.router.Use(srv.mw.CORS())
srv.router.Use(srv.mw.CSP())
srv.router.Use(middleware.Timeout(routeTimeout))