added cors and get api