Cloudflare replaces my js with image

#1

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.

#2

Can you post the URL?

#3

It is at.
https://bokningar.rekoresor.app/

The firewall should allow access now.

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

#4
  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).
#5

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

#6

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?

#7

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: https://pastebin.com/yXUHvN2s
orig JS file: https://pastebin.com/npeJZuvr

The source is here https://github.com/HisingeBussAB/reko-tour-booking-system/

1 Like
#8

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.

#9

Do you have cache deception armour on or off?

#10

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
https://test.hisingebuss.app/
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
closed #11

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