Skip to content

Commit 09cdf51

Browse files
authored
fix: fix support for some legacy registry servers (#5609)
Some registry servers do not recognize `application/vnd.npm.install-v1+json` in the Accept header, so here we add `application/json` as fallback.
1 parent f6e9b94 commit 09cdf51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@vue/cli/lib/util/ProjectPackageManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class PackageManager {
248248

249249
const headers = {}
250250
if (!full) {
251-
headers.Accept = 'application/vnd.npm.install-v1+json'
251+
headers.Accept = 'application/vnd.npm.install-v1+json;q=1.0, application/json;q=0.9, */*;q=0.8'
252252
}
253253

254254
if (authToken) {

0 commit comments

Comments
 (0)