Resource interpreted as Font but transferred with MIME type font/woff: | Django Framework

StackOverflow https://stackoverflow.com/questions/18271257

  •  24-06-2022
  •  | 
  •  

Question

I know in Apache One adds

RewriteEngine On
RewriteRule !(\.ico\.gif|\.png|\.jpe?g|\.css|\.js|\.php|\.eot|\.svg|\.ttf|\.woff|\.otf|^public/.*)$ index.php [nocase,last]

but How I do with Django, these rules

Was it helpful?

Solution

So, you are serving static files in Django dev server?

In settings.py I think you need:

if DEBUG:
    import mimetypes
    mimetypes.add_type("application/font-woff", ".woff", True)

...from info given in these questions on SO:

Resource interpreted as Font but transferred with MIME type application/x-font-woff
Django development server and MIME types

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top