› ~/

Mime-types in Azure

2015-03-11

Aah the wordpress site is up, the theme has been added and everything is looking correct, except that some of the fonts that are being used in the stylesheet are not being loading properly, I’m getting 404s.

404

The files seems to be located in the right folder and there is nothing wrong with the filenames. Crap, so it’s something else. I’m trying to send something over http that isn’t text and that should have been clear because the error message hinted that it tried to get the fonts with the MIME-type text/html, doh!

An Internet media type is a standard identifier used on the Internet to indicate the type of data that a file contains.

wikipedia

Okey so it’s MIME-type related, but just how do I change the settings in Azure for this? For some reason I was under the impression that my website would be running Apache, but it’s running with IIS. Well okey, so that means that there should be a config file somewhere!

I can’t find any configuration settings for MIME-types or any browser UI for the config file in the azure web portal, time to search in the site again. Success, the web.config file is located in the wwwroot of the Wordpress website.

Would a browser based editor for the web.config files would be a good idea?

So the only thing that is, hopefully, left to do is to add some settings for our mime-types in the staticContent. Configure mime types azure websites

After updating the web.config, the errors are finally gone!

Edit: Woff2 is here!

Written by
Andreas