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:
1 parent
f42c6214a0
commit
3587ce92cd
6 files changed
+74
-39
No files matched your search
@@ -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))
|
||||
|
||||
|
||||
Reference in new issue
Block a user