Commit 2acb9a6e authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub

Merge pull request #3081 from ethernomad/cors-max-age

rpc: set CORS Max-Age to reduce preflight OPTIONS requests
parents a7cc3248 ae341b31
......@@ -170,6 +170,7 @@ func newCorsHandler(srv *Server, corsString string) http.Handler {
c := cors.New(cors.Options{
AllowedOrigins: allowedOrigins,
AllowedMethods: []string{"POST", "GET"},
MaxAge: 600,
})
return c.Handler(srv)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment