Commit ae341b31 authored by Jonathan Brown's avatar Jonathan Brown

rpc: set CORS Max-Age to reduce preflight OPTIONS requests

parent ab7adb00
......@@ -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