Skip to content

Commit

Permalink
feat: auth callback content type (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
conwnet authored Dec 4, 2024
1 parent 932c504 commit 0aacf13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/api/github-auth-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion functions/api/gitlab-oauth-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0aacf13

Please sign in to comment.