Static website uploaded to pages renders as text only

Just had the same issue after uploading via Firefox. Folder or zip doesn’t matter - from what I can tell from the UI the list of files is processed inside the browser?
I had to change something to trigger updated files and reupload from Brave.

Actually never mind - because some files are still unchanged, my site is still broken.

Same issue at Uploaded initially from Firefox (worked for a couple of days) then substantially uploaded via wrangler with my build system (GitHub - meower-community/ ShowierData9978 - creater and maintainer)

One more of these over here. Firefox also. Recreating the project in chrome and uploading fixed it.

Same issue here…i did a bit of research…under firefox, the upload post request sends a json with the file embedded in base64…this json also has a “contentType” field which has an empty string(“”) value…did the same thing with Chrome and here the field has a “text/html” value.

so definitely a browser / client javascript issue

Hello, I faced the same issue here and discovered that it is caused by automatically added header x-content-type-options: nosniff.

The header can be removed by adding _headers file with content:

! X-Content-Type-Options

See http headers - How to prevent cloudflare from setting "x-content-type-options: nosniff"? - Stack Overflow

1 Like