diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-10-05 21:47:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-05 21:47:10 +0800 |
commit | 2acb9a6ea7ddab541122ede96f2275598ae36931 (patch) | |
tree | 258e6c7f106798e63bd45791fb87d3a677c85e48 | |
parent | a7cc3248fe3ecb3439d0b69f5823f294b2854886 (diff) | |
parent | ae341b31c869bc77decaf843fc2417f386440d77 (diff) | |
download | dexon-2acb9a6ea7ddab541122ede96f2275598ae36931.tar dexon-2acb9a6ea7ddab541122ede96f2275598ae36931.tar.gz dexon-2acb9a6ea7ddab541122ede96f2275598ae36931.tar.bz2 dexon-2acb9a6ea7ddab541122ede96f2275598ae36931.tar.lz dexon-2acb9a6ea7ddab541122ede96f2275598ae36931.tar.xz dexon-2acb9a6ea7ddab541122ede96f2275598ae36931.tar.zst dexon-2acb9a6ea7ddab541122ede96f2275598ae36931.zip |
Merge pull request #3081 from ethernomad/cors-max-age
rpc: set CORS Max-Age to reduce preflight OPTIONS requests
-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) } |