Bypass service worker for attachment + inline-image fetches

Fixkamo-internal
Shipped
May 16, 2026 at 12:07 AM UTC
Author
kamo
Commit
dace042

Clicking an <a download> attachment row navigated to the file instead of downloading it. The email service worker was intercepting every /api/email/* GET, including binary streams, and returning the response via respondWith — Chrome treats SW-synthesized responses differently from network responses for download-attribute clicks, so the browser opened the file in-page instead of saving it. Pasting the same URL into a new browser worked because it bypassed the worker. Skip SW interception for **************** and **************** so the browser handles them natively. Inline images still get cached via the backend's Cache-Control: max-age=3600.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing