Issue Description
When running a Remix application with Hono and Cloudflare Workers, an error occurs when modifying headers.
Environment
- Wrangler: v3.84.1
- @remix-run/cloudflare: 2.13.1
- @remix-run/react: 2.13.1
- hono: 4.6.8
- remix-hono: 0.0.16
Steps to Reproduce
- Set up a Remix project with Hono and Cloudflare Workers
- Implement static asset handling using the
staticAssets function
- Run the application using Wrangler
Error Message
TypeError: Can't modify immutable headers.
Root Cause
The error occurs because the staticAssets middleware attempts to modify the if-none-match header directly on the immutable Request object. In newer versions of the runtime or dependencies, this operation is not allowed on immutable headers.
Issue Description
When running a Remix application with Hono and Cloudflare Workers, an error occurs when modifying headers.
Environment
Steps to Reproduce
staticAssetsfunctionError Message
Root Cause
The error occurs because the
staticAssetsmiddleware attempts to modify theif-none-matchheader directly on the immutableRequestobject. In newer versions of the runtime or dependencies, this operation is not allowed on immutable headers.