diff --git a/VXAutoUpdater/Core/VXMusicAutoUpdater.cs b/VXAutoUpdater/Core/VXMusicAutoUpdater.cs index 971baa1..4baa7d8 100644 --- a/VXAutoUpdater/Core/VXMusicAutoUpdater.cs +++ b/VXAutoUpdater/Core/VXMusicAutoUpdater.cs @@ -133,7 +133,8 @@ public async Task DownloadUpdate(Release release) using (var httpClient = new HttpClient()) { - httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", _personalAccessToken); + if(!string.IsNullOrEmpty(_personalAccessToken)) + httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", _personalAccessToken); httpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("VXMusic", "1.0")); httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/octet-stream"));