Skip to content

fix: serve project favicons with correct mime type#1313

Open
sabraman wants to merge 2 commits intopingdotgg:mainfrom
sabraman:fix/project-favicon-jpeg-mime
Open

fix: serve project favicons with correct mime type#1313
sabraman wants to merge 2 commits intopingdotgg:mainfrom
sabraman:fix/project-favicon-jpeg-mime

Conversation

@sabraman
Copy link

@sabraman sabraman commented Mar 22, 2026

Summary

  • serve project favicons with Mime.getType(...) instead of a hand-written extension map
  • keep regression coverage for a .jpeg icon discovered from project HTML metadata

Why

The project favicon proxy resolves arbitrary rel="icon" hrefs from user projects. The original implementation used a smaller custom MIME map than the rest of the server, which caused .jpeg favicons to fall back to application/octet-stream.

This change fixes the .jpeg case and removes the duplicate MIME lookup logic so the favicon route stays aligned with the server's other file-serving paths.

Verification

  • bun run vitest apps/server/src/projectFaviconRoute.test.ts
  • bun fmt
  • bun lint
  • bun typecheck

@coderabbitai
Copy link

coderabbitai bot commented Mar 22, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4ec90a51-0f03-42b4-9513-2347e5cf6e6f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 22, 2026
@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Mar 22, 2026
@sabraman sabraman changed the title fix: serve jpeg project favicons with image mime fix: serve project favicons with correct mime type Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant