mirror of
https://github.com/status-im/op-geth.git
synced 2025-02-03 02:13:50 +00:00
rpc: set CORS Max-Age to reduce preflight OPTIONS requests
This commit is contained in:
parent
ab7adb0027
commit
ae341b31c8
@ -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…
x
Reference in New Issue
Block a user