Changed before_filter for CORS