diff --git a/functions/api/github-auth-callback.ts b/functions/api/github-auth-callback.ts index ce9104fb9..34818e035 100644 --- a/functions/api/github-auth-callback.ts +++ b/functions/api/github-auth-callback.ts @@ -60,7 +60,7 @@ export const onRequest: PagesFunction<{ const response = await fetch('https://github.com/login/oauth/access_token', { method: 'POST', body: JSON.stringify({ client_id: env.GITHUB_OAUTH_ID, client_secret: env.GITHUB_OAUTH_SECRET, code }), - headers: { 'content-type': 'application/json' }, + headers: { accept: 'application/json', 'content-type': 'application/json' }, }); return response.json().then((result) => createResponse(response.status, result)); } catch (e) { diff --git a/functions/api/gitlab-auth-callback.ts b/functions/api/gitlab-auth-callback.ts index bf43a2505..46143f37d 100644 --- a/functions/api/gitlab-auth-callback.ts +++ b/functions/api/gitlab-auth-callback.ts @@ -68,7 +68,7 @@ export const onRequest: PagesFunction<{ redirect_uri: AUTH_REDIRECT_URI, grant_type: 'authorization_code', }), - headers: { 'content-type': 'application/json' }, + headers: { accept: 'application/json', 'content-type': 'application/json' }, }); return response.json().then((result) => createResponse(response.status, result)); } catch (e) {