From 89c512dc2fc76b4a33040ddb809ba144c1865fcb Mon Sep 17 00:00:00 2001 From: Tristan Lee Date: Fri, 27 Oct 2023 12:58:36 -0400 Subject: [PATCH] Remove rewrite in image path --- examples/v7-image-optimization/edge-functions/main.js | 2 +- examples/v7-image-optimization/routes.js | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/examples/v7-image-optimization/edge-functions/main.js b/examples/v7-image-optimization/edge-functions/main.js index 62dc2e34f..0d37d939d 100644 --- a/examples/v7-image-optimization/edge-functions/main.js +++ b/examples/v7-image-optimization/edge-functions/main.js @@ -81,7 +81,7 @@ const generateImageCards = (wikimediaImages) => { optimizations[index % optimizations.length]; return `
- ${description} + ${description}

${description} using:

?${optimization}

diff --git a/examples/v7-image-optimization/routes.js b/examples/v7-image-optimization/routes.js index af48b2733..9013148cd 100644 --- a/examples/v7-image-optimization/routes.js +++ b/examples/v7-image-optimization/routes.js @@ -22,19 +22,10 @@ export default new Router() }); }) - .match(/\/img-optimize\/(.*)/, { + .match('/:path*', { origin: { set_origin: 'wikiupload', }, - url: { - url_rewrite: [ - { - source: '/img-optimize/(.*)', - syntax: 'regexp', - destination: '/$1', - }, - ], - }, response: { optimize_images: true, },