Worker for URL Masking/Reverse Proxy and Issue loading JS from Nuxt App

Hello!

I am currently using a worker via Cloudlfare to proxy a webpage and deliver it out on another domain.

Use case:

  1. We make an app (partnerpage.io)
  2. A customer wants to show this app on their domain acmecorp.com/partners
  3. We use the worker to proxy our app and deliver it on our customers domain (they set cloudflare up and use a bit of JS in the worker that we help them with.

Currently we have this set up in a testing environment

  1. Our app is http://alexodoricodev.prod.partnerpage.io/partners
  2. The work is running
  3. Here’s the worker doing its magic on another domain https://www.alexodoricodev.com/partners

When you visit the domain here we are seeing that some of our JS files for our App are not loading. It’s strange and its actually causing our app to fail because we need some of those JS libraries/files to build out our Nuxt app functionality to consume data from the back-end API’s

Anyone have an idea as to why the JS files aren’t fully loading after the worker proxies the page?

Everything loads fine here: https://alexodoricodev.prod.partnerpage.io/partners
but not here: https://www.alexodoricodev.com/partners

If you go to Dev tools in Chrome and look at the console you will see that certain js files are not loading on the 2nd url.

We are very stuck, please help! :wink:

TY!

Not really enough information to be sure, but are the requests that return 404 being routed to the worker? If so, perhaps it’s an error in your worker.

Using curl to make a request to one of the 404 endpoints, I see the x-cloud-trace-context header indicating the request is making its way to GCP somehow. Maybe the problem is that the GCP app isn’t expected that hostname or similar?

Hi @samuelcolvin - actually we see the same thing with our clients who are using proxy_pass on nginx and cloudfront aws - so I dont know if this is a Cloudflare issue or maybe something we’re doing in our application.

We’re that GCP is showing for that as our app is on AWS… let me try the same cloud trace with the team and see what we discover