catgirl
12/05/2020, 4:22 PMcatgirl
12/05/2020, 4:22 PMcatgirl
12/05/2020, 4:22 PMkristian
12/05/2020, 4:44 PMkristian
12/05/2020, 4:45 PMitsmatteomanf
12/05/2020, 4:46 PMalbert-zhao
12/05/2020, 4:49 PMitsmatteomanf
12/05/2020, 4:50 PMCodeCo
12/05/2020, 4:50 PMitsmatteomanf
12/05/2020, 4:50 PMCodeCo
12/05/2020, 4:54 PMcatgirl
12/05/2020, 5:26 PMCodeCo
12/05/2020, 5:33 PMcatgirl
12/05/2020, 5:34 PMitsmatteomanf
12/05/2020, 5:44 PMcatgirl
12/05/2020, 5:49 PMcatgirl
12/05/2020, 5:50 PMcatgirl
12/05/2020, 5:55 PMitsmatteomanf
12/05/2020, 6:35 PMai
12/05/2020, 6:55 PMai
12/05/2020, 6:56 PMcatgirl
12/05/2020, 7:08 PMCodeCo
12/05/2020, 7:15 PMCodeCo
12/05/2020, 7:15 PMhttps://tenor.com/Gxh8.gif▾
Unkn0wnCat
12/05/2020, 7:38 PMitsmatteomanf
12/05/2020, 8:12 PMJames
12/07/2020, 1:31 AMimage.png to image.avif or image.webp where supported (as per the accept) header with kv-asset-handler, that would be 👌itsmatteomanf
12/07/2020, 1:37 AMaccept header is there?James
12/07/2020, 1:46 AMFetchEvent, attach a new Request with an updated URL, and pass that into kv-asset-handler I guess - that's pretty hacky though. As far as I know (and had no luck trying), you can't just override an existing event.request.url for example, since that's read-only.itsmatteomanf
12/07/2020, 1:51 AMnew Request(new URL(...), event.request), it's basically the same code used in the default catch for not found assets. It's remapping to ${new URL(req.url).origin}/404.html.