From 099b34aeb2edd490a35e8c826e52d2ab9895df5d Mon Sep 17 00:00:00 2001 From: Diego Dompe Date: Wed, 27 Nov 2024 09:32:30 -0800 Subject: [PATCH] Use explicit request for json return data during OAuth token request. Some OAuth providers like GitHub default to return web encoded strings instead of JSON. This enables the use of cratery with GitHub Enterprise as OAuth provider. Signed-off-by: Diego Dompe --- src/services/database/users.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/database/users.rs b/src/services/database/users.rs index 521c642..90efb82 100644 --- a/src/services/database/users.rs +++ b/src/services/database/users.rs @@ -48,6 +48,7 @@ impl Database { ("client_id", &configuration.oauth_client_id), ("client_secret", &configuration.oauth_client_secret), ]) + .header(reqwest::header::ACCEPT, "application/json") .send() .await?; if !response.status().is_success() {