diff options
author | Jonathan Brown <jbrown@bluedroplet.com> | 2016-10-03 19:18:46 +0800 |
---|---|---|
committer | Jonathan Brown <jbrown@bluedroplet.com> | 2016-10-03 21:24:58 +0800 |
commit | ae341b31c869bc77decaf843fc2417f386440d77 (patch) | |
tree | 6f5961d59b6aa2421df4239a960ec09879ca8632 /rpc/http.go | |
parent | ab7adb0027dbcf09cf75a533be356c1e24c46c90 (diff) | |
download | dexon-ae341b31c869bc77decaf843fc2417f386440d77.tar.gz dexon-ae341b31c869bc77decaf843fc2417f386440d77.tar.zst dexon-ae341b31c869bc77decaf843fc2417f386440d77.zip |
rpc: set CORS Max-Age to reduce preflight OPTIONS requests
Diffstat (limited to 'rpc/http.go')
-rw-r--r-- | rpc/http.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rpc/http.go b/rpc/http.go index afcdd4bd6..c923580bf 100644 --- a/rpc/http.go +++ b/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) } |