diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-12-21 13:40:22 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-21 13:40:22 +1100 |
commit | b5fdfb9d25a636725d3aeae055bd1e740f6ec1d6 (patch) | |
tree | 756f972e25e272af64991506f5bdc1803cee754c /cli/lsp/registries.rs | |
parent | 1eb78731eb57b1d0eb7c0ece97b2018c1724989e (diff) |
feat(lsp): supply accept header when fetching registry config (#13159)
Closes #13153
Diffstat (limited to 'cli/lsp/registries.rs')
-rw-r--r-- | cli/lsp/registries.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs index fc7e13fb7..912a6a9de 100644 --- a/cli/lsp/registries.rs +++ b/cli/lsp/registries.rs @@ -482,7 +482,11 @@ impl ModuleRegistry { ) -> Result<Vec<RegistryConfiguration>, AnyError> { let fetch_result = self .file_fetcher - .fetch(specifier, &mut Permissions::allow_all()) + .fetch_with_accept( + specifier, + &mut Permissions::allow_all(), + Some("application/vnd.deno.reg.v2+json, application/vnd.deno.reg.v1+json;q=0.9, application/json;q=0.8"), + ) .await; // if there is an error fetching, we will cache an empty file, so that // subsequent requests they are just an empty doc which will error without |