diff --git a/examples/v7-edge-functions/functions/general/signed-request/main.js b/examples/v7-edge-functions/functions/general/signed-request/main.js index 3c0919415..b7dba6688 100644 --- a/examples/v7-edge-functions/functions/general/signed-request/main.js +++ b/examples/v7-edge-functions/functions/general/signed-request/main.js @@ -3,7 +3,13 @@ import HmacSHA1 from 'crypto-js/hmac-sha1'; import Base64 from 'crypto-js/enc-base64'; import createFetchForOrigin from '../../../utils/createFetchForOrigin'; -const fetch = createFetchForOrigin('echo'); +const fetch = createFetchForOrigin('echo', { + edgio: { + caching: { + bypass_cache: true, + }, + }, +}); export async function handleHttpRequest(request, context) { // ** IMPORTANT ** diff --git a/examples/v7-edge-functions/utils/createFetchForOrigin.ts b/examples/v7-edge-functions/utils/createFetchForOrigin.ts index 4b118db5c..aa25d9744 100644 --- a/examples/v7-edge-functions/utils/createFetchForOrigin.ts +++ b/examples/v7-edge-functions/utils/createFetchForOrigin.ts @@ -13,9 +13,13 @@ export default function createFetchWithOrigin(originName: string) { } return async (url: string | Request, options: any = {}) => { + const edgio = options.edgio || {}; + delete options.edgio; + const modifiedOptions = { ...options, edgio: { + ...edgio, origin: originName, }, };