Resource blocked due to MIME type mismatch

Hi,

Since nobody else has responded, I’ll take a guess :slight_smile:

I’d assume the reason you are getting text/html as the MIME type is because the request for that static file is being served from the same domain as your app, and so is being treated like a dynamic request. As you mention with the toml, you could get Fly to handle that for you, as the request has to pass through its proxy to get to your app. It can adjust the headers.

However it may be easier to handle it in your app. Then it would be consistent with local (where you don’t have the Fly proxy). You’d likely want something like Using WhiteNoise with Django - WhiteNoise 6.3.0 documentation to handle static files. Nodejs has something similar - you need to tell it you want it to handle static files (paths, headers etc), else it doesn’t know to do that.

If you already have whitenoise (or equivalent) it would likely be a case of adjusting the path to account for where the files are on Fly vs local. Maybe via an environment variable.