Shopify with worker

We have main site hosted on Shopify and blog hosted at another server
www.example.com → shopify
www.example.com/blog → blog server

Used workers to achieve that but today it stop working. If I enable CF proxy then main site stopped working and if I disable it then it is working fine.
Getting error as per attached screenshot.
Please help to resolve this or if not then how can we achieve this via solution other than Cloudflare.

Can you check if the Worker Routes are still in place?

Also can you give a little more detail about how you implemented Workers previously? Was it a route on /blog that handed over to Workers to do something about fetching your blog pages or was it a passthrou?

We have a similar issue. Also, our workers are not running anymore. It looks like Shopify or Cloudflare has changed something here since yesterday.

We have disabled all workers. Bot protection disabled, etc. None of these helps.

1 Like

Yes, it was implemented on /blog route and orange cloud enabled.
We had to disable it because main site was not working.

Yes it was working fine for months but yesterday something changed and now Cloudflare and Shopify both seem useless because we have to change everything to subdomain and our SEO ranking will be affected heavily because of the dumb Cloudflare :unamused:

Cloudflare Workers has an option to set a version lock on your Worker so that things don’t break with newer versions of the codes javascript environment. You may be able to fix the issue fairly quickly be setting back some versions and see if it works again, but ideally it would be good to find where things are breaking and get that fixed.

Would you be able to share the Worker code so I can set it up an a test environment to inspect where its going wrong. Or would you be able to share access with me?

Yes, it’s important to get this resolved quickly.

You may even be able to do away with the Worker completely by instead using a transform.

You didn’t understand the issue. You had to disable orange cloud to make site working, without orange cloud workers won’t work.
Issue is when you enable orange cloud then main shopify site is getting stop working. It was working fine for months.

Yes, I read what you said about having disabled the :orange: proxy to get the main Shopify site working right away; And I assume your using a subdomain for the blog in the meantime until you can get the Worker working again on /blog/ route.

I work with Shopify and Cloudflare Workers often and haven’t had any issues recently but I don’t doubt your experiencing an issue. From what you’ve said where it was working for months and then out of the blue it suddenly stopped, it sounds to me like an issue with a newer version of the Cloudflare Worker runtime environment.

I actually experienced the same thing. I’m not sure if you’re on the enterprise plan and using the SSL for SaaS Custom Hostnames but my issue was that the Custom Hostname was marked as “moved” and the certificate was in a “pending-deletion” status.

After some digging and some help from CF support - we determined that this was because Shopify uses the same SSL for SaaS system in Cloudflare to issue certificates and it tried to take the www domain back from my zone. Basically we (myself and Shopify) were battling back and forth for control of the www domain. We deleted the Custom Hostname and re-added it and the site started working again.

The problem is that this might happen again randomly in the future once Shopify realizes it doesn’t own www traffic and tries to take it back again. You might think that you can simply remove the www from the Shopify Domains list but if you do this Shopify won’t know how to respond to traffic from the www domain and will simply respond with a “One more step to setup your store” page.

you are right I have tried to remove www from shopify and route traffic via CF workers but seems like Shopify security blocking the traffic from other domains.

Possible but I have tried to enable the log and tried to trace out the requests but I found that requests were not being passed by workers and Shopify is not able to verify the domain connection that’s why showing the error I have attached.

I suspect that may be the problem. We also had to deal with Shopify support. And they also told us that it has “something” to do with the SSL certificate.

I have tried the following:

  • Shopify: Domain removed
  • Cloudflare: mydomain.com and www. mydomain .com to “DNS only”.
  • Shopify: domain inserted and connected

It works. Next case.

  • Shopify: domain removed
  • Cloudflare: mydomain.com and www .mydomain.com on “DNS only”.
  • Shopify: added domain and connected
  • Cloudflare: set mydomain.com and www. mydomain .com to proxy-switch again.

Works. For a few minutes. After that comes an error message (503) and in the domain admin of Shopify that the domain is no longer connected. New attempts to connect, fail.

Next case.

  • Shopify: domain removed
  • Cloudflare: mydomain .com and www. mydomain .com enabled with proxy switch.
  • Shopify: adding domain. It doesn’t work. An error message comes up that the DNS records cannot be validated.

To note. That I had all workers disabled. I also tried every combination of SSL settings (strict, etc).

Any news or workaround here?