diff --git a/functions/api/github-auth-callback.ts b/functions/api/github-auth-callback.ts index e58ec9da8..034c73211 100644 --- a/functions/api/github-auth-callback.ts +++ b/functions/api/github-auth-callback.ts @@ -48,7 +48,7 @@ export const onRequest: PagesFunction<{ const createResponse = (status, data) => { const body = createAuthorizeResultHtml(data, env.GITHUB1S_ALLOWED_ORIGINS); - return new Response(body, { status }); + return new Response(body, { status, headers: { 'content-type': 'text/html' } }); }; if (!code) { diff --git a/functions/api/gitlab-oauth-callback.ts b/functions/api/gitlab-oauth-callback.ts index 8b2e80496..39befcf15 100644 --- a/functions/api/gitlab-oauth-callback.ts +++ b/functions/api/gitlab-oauth-callback.ts @@ -50,7 +50,7 @@ export const onRequest: PagesFunction<{ const createResponse = (status, data) => { const body = createAuthorizeResultHtml(data, env.GITLAB1S_ALLOWED_ORIGINS); - return new Response(body, { status }); + return new Response(body, { status, headers: { 'content-type': 'text/html' } }); }; if (!code) {