Enable controller to have CORS

This commit is contained in:
Harshavardhana committed 2015-08-31 01:47:05 -07:00
1 parent dcf0c71ca3
commit f39ac24e99
9 files changed
+1111 -1

No files matched your search

+2 -1
View File
@@ -21,6 +21,7 @@ import (
router "github.com/gorilla/mux"
"github.com/minio/minio/pkg/rpc"
"github.com/rs/cors"
)
// getRPCHandler rpc handler
@@ -39,5 +40,5 @@ func getRPCHandler() http.Handler {
// registerRPC - register rpc handlers
func registerRPC(mux *router.Router, s *rpc.Server) http.Handler {
mux.Handle("/rpc", s)
return mux
return cors.Default().Handler(mux)
}