mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-24 20:37:17 +00:00
Merge pull request #3081 from ethernomad/cors-max-age
rpc: set CORS Max-Age to reduce preflight OPTIONS requests
This commit is contained in:
commit
2acb9a6ea7
@ -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…
Reference in New Issue
Block a user