Updated controllers with Access-Control-Allow-Origin header