Implement a convenience function to set CORS header.