I created a worker for this https://github.com/pmeenan/cf-workers/tree/master/optimization-pack using a free subdomain (provided by cloudflare) and set the route to mysite.com/ but when i load my site, it still loads the google fonts and external js from the actual source. I am not using this on a subdomain of my site.
Within the cloudflare dashboard it is showing metrics like it is working.
I am using this with Magento 2.3.6 and if i load that js into the workers playground and preview my site, it works as expected so it appears that worker can work with magento and must be my implementation but i am not sure where to start to debug. My wrangler.toml has my account id and zone id, the JS was copied into index.js
I would appreciate any help of where to look for potential issues.
In case of loading fonts and JS, check the source of the referenced files and you can often see that they in-turn, load additional resources (from the source). If you want to proxy them properly, you’ll have to dig out the actual source files and pass them through in the worker.
I will bear that in mind, but first i would like to get the actual referenced files proxied which is not what is happening at the moment.
That’s exactly what @thomas4 explained.
If you need more specific guidance, please post a page URL that demonstrates the problem.
My site is https://www.clicksaveandprint.com
I guess i misunderstood what @thomas4 was saying, but things like platform.twitter.com/widgets.js from twitter that is in the worker script is not being proxied, it is still being loaded direct from twitter.
Google fonts are also loading from the google servers without being proxied