Closed MadeByMike closed 4 years ago
I also have a related problem with svg
images MIME type in admin ui.
From this doc: https://www.keystonejs.com/guides/custom-field-types/#example
@pahaz, I'm pretty sure this fix (#2864) will resolve your issue too. Would be great if you can update your dependancies and confirm that? It's being shipped right now.
Bug report
Describe the bug
Currently, bundles returned for the Admin UI (eg.
[/admin/js/main.b84baf6b30d5f4898129.bundle.js](http://localhost:3000/admin/js/main.b84baf6b30d5f4898129.bundle.js)
) are returned to the browser with acontent-type: */*
header. This occurs in dev and production modes.Usually this doesn't cause a problem; I believe this is because browsers have
strict MIME type checking
disabled by default. If a nginx config on the server specifically turns this checking on:It fails to load.
So, the combination of the hardened nginx config and Keystone's sloppy headers causes an error.
It refuses to execute the script because its MIME type ('/') is not executable, and strict MIME type checking is enabled.