Angular PWA having an problem with static page when cloudflare is used

We are running the Angular 9 website. We have implemented PWA.

It is running using Serverside rendering (SSR)

For the static page, it is not working with Cloudflare.

example:
URL without cloudflare: http://coursesity-dev.herokuapp.com/policy [Working]
URL with cloudflare: https://dev.coursesity.com/policy [Not Working]

Both URLs are pointing to the same server. Without cloudflare it is working as expected,
with Cloudflare it is not.

How to fix this? Any help would be appreciated.

I’m getting an application error which is on your end. Otherwise, seems to work. What issue are you facing?

Please try again https://dev.coursesity.com/

Getting error with cloudflare:

No error without cloudflare:

This is something on your end, check your logs for errors as the page stated for you. Here it is also throwing a 503 (Service Unavailable)

Please see the screenshot I have added in my previous comment.

Both domains are pointing to the same server and same page.

One is using Cloudflare. while another is using Heroku.

If there is a server side problem then both domains should not work. But only cloudflare one is not working with PWA service worker.

What do the Heroku logs say? It’s probably happening due to CF yes but it isn’t CF itself which is at fault. Something in your code likely just doesn’t support CF. Check the logs and see what they say. If this was a Cloudflare issue you’d see a Cloudflare error page rather than a Heroku one.

This topic was automatically closed after 31 days. New replies are no longer allowed.