diff --git a/functions/api/github-auth-callback.ts b/functions/api/github-auth-callback.ts index 034c73211..ce9104fb9 100644 --- a/functions/api/github-auth-callback.ts +++ b/functions/api/github-auth-callback.ts @@ -60,6 +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' }, }); 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 39befcf15..bf43a2505 100644 --- a/functions/api/gitlab-auth-callback.ts +++ b/functions/api/gitlab-auth-callback.ts @@ -68,6 +68,7 @@ export const onRequest: PagesFunction<{ redirect_uri: AUTH_REDIRECT_URI, grant_type: 'authorization_code', }), + headers: { 'content-type': 'application/json' }, }); return response.json().then((result) => createResponse(response.status, result)); } catch (e) {