cors support, json api cleaning