Cloudflare replaces my js with image

I am running a react app and it was working, but suddenly Cloudflare has replaced my main.js with an image. The image is a green shield with a check mark inside it.

I have tried purging the cache and disable my firewall rules and other settings, i also disabled the proxy to make sure my server is serving the right content with the right mime types and it is.

Can you post the URL?

It is at.

The firewall should allow access now.

I have also noticed my css files as well get replaced by the image.

  1. Make sue main.c73552f8.js is not a image with js extension on your server file system.
  2. You may have a security solution installed on the server which replaces js file (for example detected as harmful) with image on the fly (if using a share hosting then ask the hosting company).

The site works perfectly and loads booth js and css as it should as soon as i disable Cloudflare proxy

Since the resource is not coming from CF cache clearing cache does not help too. Seems a CF issue. Can you share the js somewhere like pastebin?

Is not just the js file … it is the css file also which is even wierder

I can but they are React builds so they are minifed…
orig CSS file:
orig JS file:

The source is here GitHub - HisingeBussAB/reko-tour-booking-system: Custom made system for easier administration at a small bus travel agency.

1 Like

Checked js file with a few scanners for a false positive and nothing showed up (pessimistic about some scanner is in place). Two possibilities remain:

  1. Your server responds to CF servers differently (replaces js with image).
  2. CF is responsible for file change.

On this forum most people will disagree the latter. Either case, my guess is a security solution is triggered falsely.

Do you have cache deception armour on or off?

I am not using any page rules so I guess it is off? I can’t find the setting anywhere else.

I tried the same with a totally different site and another account
That site works behind Cloudflare in the same account with all the same setting when it is served from Google Firebase but not from the host above.

So I guess i have to wait for a response from my host. Thanks for the assistance.

1 Like

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