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

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

Conversation

@igboyes

Copy link
Copy Markdown
Member

No description provided.

@cloudflare-workers-and-pages

cloudflare-workers-and-pagesBot 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.

StatusNameLatest CommitPreview URLUpdated (UTC)
✅ Deployment successful!
View logs
virtool-cadc51391Commit Preview URL

Branch Preview URL
May 05 2026, 09:20 PM

@gemini-code-assistgemini-code-assistBot 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 threadsrc/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.

returnResponse.json(data);

@igboyes
igboyes merged commit 3e8fb5e into mainMay 5, 2026
5 checks passed
Sign up for freeto 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

@igboyes