-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Background
Per adobe/helix-deploy-plugin-edge#77 and comment, @adobe/fetch should support the fastly: { decompressGzip: true } option to align Fastly and Cloudflare's fetch behavior.
Proposal
Add support for the Fastly-specific decompressGzip option within a fastly options object:
import { fetch } from '@adobe/fetch';
const response = await fetch(url, {
fastly: {
decompressGzip: true
}
});Behavior
- Fastly: Pass through to native
fastly.decompressGzipoption - Cloudflare: No-op (Cloudflare automatically handles decompression)
- Node.js: Map to existing
compress/decodeoptions
Context
Cloudflare Workers automatically decompress gzip responses. Fastly requires explicit opt-in via decompressGzip. Supporting this option in @adobe/fetch allows writing portable code that works identically across platforms.
Implementation Notes
Since @adobe/fetch already handles compression transparently via the compress and decode options (defaults to true), this would primarily be:
- Accept
fastly.decompressGzipin options - Map to platform-appropriate behavior
- Document as the cross-platform way to control decompression
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request