mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 03:30:35 +00:00
rpc: add support for extended headers in CORS requests (#3783)
Fixes #3762. Details about parameter:
a62a804a8a/cors.go (L50-L54)
This commit is contained in:
parent
61ede86737
commit
4e4e5fca54
@ -171,6 +171,7 @@ func newCorsHandler(srv *Server, corsString string) http.Handler {
|
||||
AllowedOrigins: allowedOrigins,
|
||||
AllowedMethods: []string{"POST", "GET"},
|
||||
MaxAge: 600,
|
||||
AllowedHeaders: []string{"*"},
|
||||
})
|
||||
return c.Handler(srv)
|
||||
}
|
||||
|
@ -82,6 +82,7 @@ func StartHttpServer(api *api.Api, server *Server) {
|
||||
AllowedOrigins: allowedOrigins,
|
||||
AllowedMethods: []string{"POST", "GET", "DELETE", "PATCH", "PUT"},
|
||||
MaxAge: 600,
|
||||
AllowedHeaders: []string{"*"},
|
||||
})
|
||||
hdlr := c.Handler(serveMux)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user