add Cross-Origin Resource Sharing support; fixes #32