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

pull/3081/head
Jonathan Brown 8 years ago
parent ab7adb0027
commit ae341b31c8
  1. 1
      rpc/http.go

@ -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)
}

Loading…
Cancel
Save