I am using CORS using gorilla handlers issues i am facing are
- it can give max-age max value just 10 minutes no way to change it.
- it doesnot send Access-Control-Allow-Methods header with all the Methods which i provide to CORS.
- it doesnot send Access-Control-Allow-Headers header with all the Header which i provide to CORS.
headersOk := handlers.AllowedHeaders([]string{"Authorization", "X-Requested-With"})
originsOk := handlers.AllowedOrigins([]string{"localhost.com", "*"})
methodsOk := handlers.AllowedMethods([]string{"GET", "HEAD", "POST", "PUT", "OPTIONS"})
log.Fatal(http.ListenAndServe(":8080", handlers.CORS(originsOk, methodsOk, headersOk, handlers.MaxAge(18600))(r)))