aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorJonathan Brown <jbrown@bluedroplet.com>2016-10-03 19:18:46 +0800
committerJonathan Brown <jbrown@bluedroplet.com>2016-10-03 21:24:58 +0800
commitae341b31c869bc77decaf843fc2417f386440d77 (patch)
tree6f5961d59b6aa2421df4239a960ec09879ca8632 /rpc
parentab7adb0027dbcf09cf75a533be356c1e24c46c90 (diff)
downloaddexon-ae341b31c869bc77decaf843fc2417f386440d77.tar
dexon-ae341b31c869bc77decaf843fc2417f386440d77.tar.gz
dexon-ae341b31c869bc77decaf843fc2417f386440d77.tar.bz2
dexon-ae341b31c869bc77decaf843fc2417f386440d77.tar.lz
dexon-ae341b31c869bc77decaf843fc2417f386440d77.tar.xz
dexon-ae341b31c869bc77decaf843fc2417f386440d77.tar.zst
dexon-ae341b31c869bc77decaf843fc2417f386440d77.zip
rpc: set CORS Max-Age to reduce preflight OPTIONS requests
Diffstat (limited to 'rpc')
-rw-r--r--rpc/http.go1
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)
}