added support for cross-origin resource sharing