Home > other >  Updating Azure App Service web.config to load .ttf font files
Updating Azure App Service web.config to load .ttf font files

Time:09-28

Wracking my brain but can't seem to find the solution. I have a .ttf font file, located on Azure storage blob, being used for a custom font on my Azure App Service site. I get a 404 "resource not found" error for this file.

After reading a ton of documentation on this, it seems I need to add a couple of lines of code, for a new "mimetype", to the web.config file. Older versions of Azure had this in "Extensions" or "Application Settings".

Other people show the ability to do so in Kudu under the "Debug" option. However, I can't seem to find either of those - "Configuration" shows environment variables and I don't see a "Debub" option in my Kudu portal. kudu image

PS: previous image shows LogFiles folder, but it should be wwwwroot

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <remove fileExtension=".ttf" />
            <mimeMap fileExtension=".ttf" mimeType="application/octet-stream" />
        </staticContent>
    </system.webServer>
</configuration>
  • Related