I am using pyramid web framework to build a website. I keep getting this warning in chrome console:

Resource interpreted as Font but transferred with MIME type application/octet-stream: "http:static/images/fonts/font.woff".

How do I get rid of this warning message?
I have configured static files to be served using add_static_view
I can think of a way to do this by adding a subscriber function for responses that checks if the path ends in .woff and setting the response header to application/x-font-woff. But it does not look like a clean solution. Is there a way to tell Pyramid to do it through some setting.
Simply add this following code where your Pyramid web app gets initialized.

import mimetypes
mimetypes.add_type('application/x-font-woff', '.woff')

For instance, I have added it in my webapp.py file, which gets called the first time the server gets hit with a request.
How to set the content type header in response for a particular file type in Pyramid web framework