``` const newRequest = new Request(request); const contentType = url.search

const newRequest = new Request(request);

            const contentType = url.searchParams.get("content-type");
            if (contentType) {
                newRequest.headers.set("Content-Type", contentType);
            }
            
            const contentDisposition = url.searchParams.get("content-disposition");
            if (contentDisposition) {
                newRequest.headers.set("Content-Disposition", contentDisposition);
            }

            return fetch(new URL(url.pathname, `https://${requiredHostname}`), newRequest);


How do i get content-disposition: attachment to cause my custom domain r2 to force a download instead of treating it as inline? Am i doing it wrong? it's appearing correctly in the param as attachment and i'm trying to send it as a header in the fetch request but the file is still being displayed in-browser instead of starting a download
Was this page helpful?