Skip to content
This repository was archived by the owner on Aug 19, 2026. It is now read-only.

fix: use correct content type for json manifests - #69

Merged
igboyes merged 2 commits into
mainfrom
releases
May 5, 2026
Merged

igboyes merged 2 commits into
mainfrom
releases

Conversation

@igboyes

@igboyes igboyes commented May 5, 2026

Copy link
Copy Markdown
Member

No description provided.

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant