I have a Django site hosted on AWS EC2 behind nginx proxy server.
When I try to access the site, the CSS and javascript are not loaded with the error
Refused to apply style from '<URL' because MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled
After spending 2 days finding the issue, it was found that the website is working fine when the domain is not proxied through Cloudflare and gives an error when proxied.
The issue is happening due to enabling HSTS and No-Sniff Header.
After disabling No-Sniff Header, the website is working fine and loading all resources.
How can I serve the static files when the No-Sniff Header is enabled