一、示例预览
在 PC 端与移动端的浏览器地址栏中输入匹配到边缘函数触发规则的 URL(如:https://example.com/origin.exe?fileName=modified.exe),即可预览到示例效果。
二、相关参考
·Runtime APIs: Fetch
·Runtime APIs: Response
该示例通过修改响应头中的 Content-Disposition 信息,实现根据请求 URL 中的 fileName 参数修改下载文件名。addEventListener(‘fetch’, event => { event.passThroughOnException(); event.respondWith(handleRequest(event.request));});async function handl。
在 PC 端与移动端的浏览器地址栏中输入匹配到边缘函数触发规则的 URL(如:https://example.com/origin.exe?fileName=modified.exe),即可预览到示例效果。
·Runtime APIs: Fetch
·Runtime APIs: Response