Added Access-Control-Allow-Origin in the response of the connect method