Closed ScottTravisHartley closed 5 years ago
Do you have a sample site I can take a look at? Doesn't need the worker on it, just something to test against that shows the issue.
From: Scott Hartley notifications@github.com Sent: Tuesday, March 19, 2019 7:44 PM To: pmeenan/cf-workers Cc: Subscribed Subject: [pmeenan/cf-workers] WordPress.com Image Proxy Images 404 (#2)
The last update that introduced const ENABLE_REWRITE_DOMAINS = true; doesn't seem to be working correctly atleast when I tested it on a website with wordpress.com's cdn proxying images.
When I had the domain being proxied all images were returning a 404 and with a CF-Cache-Status: ByPass.
I attempted reloading the page a few times to no avail so I ended up commenting out the line for wp.com images for now. The rewriting of the urls in the HTML worked as expected but it was an issue with the response returning a 404.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/pmeenan/cf-workers/issues/2, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAbHBcoA_mw4RoKIcB6Wvo9m7hcV8CVnks5vYXZrgaJpZM4b9Vlo.
https://www.sertmedia.com/ I will flip the worker switch back on for now for the images
It's actually easier if you leave it switched off if you don't mind. Then I can test the rewriting in the worker sandbox.
From: Scott Hartley notifications@github.com Sent: Tuesday, March 19, 2019 10:29 PM To: pmeenan/cf-workers Cc: Patrick Meenan; Comment Subject: Re: [pmeenan/cf-workers] WordPress.com Image Proxy Images 404 (#2)
https://www.sertmedia.com/ I will flip the worker switch back on for now for the images
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/pmeenan/cf-workers/issues/2#issuecomment-474659537, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAbHBV2siQCs40qo0hcyGckcXiayo3eWks5vYZ0GgaJpZM4b9Vlo.
Argh. Should be fixed now. There was a fast-path exit for image requests to bypass the worker logic but it was also bypassing for proxied requests, not just rewriting.
Hmm, I updated the script and I flushed NGINX Cahe + Purged the entire CloudFlare cache to no avail. I will try flipping the rewrites off for those images for now.
The last update that introduced const ENABLE_REWRITE_DOMAINS = true; doesn't seem to be working correctly atleast when I tested it on a website with wordpress.com's cdn proxying images.
When I had the domain being proxied all images were returning a 404 and with a CF-Cache-Status: ByPass.
I attempted reloading the page a few times to no avail so I ended up commenting out the line for wp.com images for now. The rewriting of the urls in the HTML worked as expected but it was an issue with the response returning a 404.