added cors support for browser and nodes