Caching incorrect files from Cloudflare

I am encountering an issue where our website is intermittently caching incorrect files from Cloudflare. It seems that .js files are sometimes being misidentified as HTML, resulting in our website appearing blank. I hope to identify the cause of this problem, thanks.

That’s most likely because when Cloudflare is asking your server for a .js file, your server returns HTML. Quite often some sort of challenge or block page as a 200 response.

Have you looked at the actual content of the .js file that’s misidentified as HTML?

It looks like the js was covered by html :thinking:

<html><head></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"use strict";(self.webpackChunkreact_starter_template_ts=self.webpackChunkreact_starter_template_ts||[]).push([[35642],{72444:function(t,e,o){e.__esModule=!0;var n=r(o(64275)),u=r(o(93516)),f="function"===typeof u.default&amp;&amp;"symbol"===typeof n.default?function(t){return typeof t}:function(t){return t&amp;&amp;"function"===typeof u.default&amp;&amp;t.constructor===u.default&amp;&amp;t!==u.default.prototype?"symbol":typeof t};function r(t){return t&amp;&amp;t.__esModule?t:{default:t}}e.default="function"===typeof u.default&amp;&amp;"symbol"===f(n.default)?function(t){return"undefined"===typeof t?"undefined":f(t)}:function(t){return t&amp;&amp;"function"===typeof u.default&amp;&amp;t.constructor===u.default&amp;&amp;t!==u.default.prototype?"symbol":"undefined"===typeof t?"undefined":f(t)}},71002:function(t,e,o){function n(t){return n="function"==typeof Symbol&amp;&amp;"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&amp;&amp;"function"==typeof Symbol&amp;&amp;t.constructor===Symbol&amp;&amp;t!==Symbol.prototype?"symbol":typeof t},n(t)}o.d(e,{Z:function(){return n}})}}]);
//# sourceMappingURL=commons-app-typeof.js.9ee5ba53dda73815bd07.js.map</pre></body></html>