From b5fdfb9d25a636725d3aeae055bd1e740f6ec1d6 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 21 Dec 2021 13:40:22 +1100 Subject: feat(lsp): supply accept header when fetching registry config (#13159) Closes #13153 --- cli/lsp/registries.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cli/lsp/registries.rs') 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, 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 -- cgit v1.2.3