// AddCors : AddCors is the middleware which will add the cors in the response and response
// with status ok on preflight request.
AddCors : AddCors is the middleware which will add the cors in the response and response
with status ok on preflight request.
// AddCors : AddCors is the middleware which will add the cors in the response and response // with status ok on preflight request .
func AddCors(h http.Handler) http.Handler {
	return http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
		setupCorsResponse(&writer, request)
		if request.Method == "OPTIONS" {
			writer.WriteHeader(http.StatusOK)
		}
		h.ServeHTTP(writer, request)
	})
}
func AddCors ( h http . Handler ) http . Handler { return http . HandlerFunc ( func ( writer http . ResponseWriter , request * http . Request ) { setupCorsResponse ( & writer , request ) if request . Method == " " { writer . WriteHeader ( http . StatusOK ) } h . ServeHTTP ( writer , request ) } ) }
AddCors : AddCors is the middleware which will add the cors in the response and response
with status ok on preflight request.
AddCors : AddCors is the middleware which will add the cors in the response and response with status ok on preflight request .