Add header to enable CORS, add missing function parameter.