如何使用Azure的Web应用程序,以使在Azure中的Web应用程序的yaml文件

问题描述:

我有一个静态的网站,但试图服务了/swagger.yaml如何使用Azure的Web应用程序,以使在Azure中的Web应用程序的yaml文件

我需要能够在配置设置YAML的时候,我得到一个404某处?它似乎服务的HTML文件罚款。

要在Azure Web App中启用YAML文件,您可以创建web.config文件到您的webroot(D:\home\site\wwwroot)(如果不存在),然后向其添加以下内容。

<?xml version="1.0" encoding="UTF-8" ?> 
<configuration> 
    <system.webServer> 
     <staticContent> 
      <mimeMap fileExtension=".yaml" mimeType="text/x-yaml" /> 
     </staticContent> 
    </system.webServer> 
</configuration>