Skip to content

fix: use correct content type for json manifests#69

Merged
igboyes merged 2 commits intomainfrom
releases
May 5, 2026
Merged

fix: use correct content type for json manifests#69
igboyes merged 2 commits intomainfrom
releases

Conversation

@igboyes
Copy link
Copy Markdown
Member

@igboyes igboyes commented May 5, 2026

No description provided.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 5, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
virtool-ca dc51391 Commit Preview URL

Branch Preview URL
May 05 2026, 09:20 PM

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds .codex to the .gitignore file, introduces the sharp dependency, and updates the release endpoints to explicitly set the Content-Type header for JSON responses. A review comment suggests using the more idiomatic Response.json() method to simplify the response logic and automatically handle headers.

Comment thread src/pages/releases/[id].json.ts Outdated
Comment on lines +19 to +23
return new Response(JSON.stringify(data), {
headers: {
"Content-Type": "application/json",
},
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using Response.json() is a more concise and idiomatic way to return JSON responses in modern JavaScript environments (Node.js 16.8+, Cloudflare Workers, etc.). It automatically handles the stringification of the data and sets the Content-Type header to application/json.

  return Response.json(data);

@igboyes igboyes merged commit 3e8fb5e into main May 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant