KamoCRM

Bypass service worker for attachment + inline-image fetches

Fixkamo-internal
Shipped
16 மே, 2026 அன்று 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?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing