<?xml version="1.0" encoding="utf-8"?>
<!-- Generated web.config for Microsoft Azure. Remove this comment to prevent
     modifications being overwritten when publishing the project.
-->
<configuration>
  <appSettings>
    <add key="WSGI_HANDLER" value="{WSGI_HANDLER}" />
    <add key="PYTHONPATH" value="{KUDU_WORKING_DIRECTORY}" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <handlers>
      <add name="Python FastCGI" path="handler.fcgi" verb="*" modules="FastCgiModule" 
          scriptProcessor="{PYTHON_PATH}|{PYTHON_WFASTCGI_PATH}" 
          resourceType="Unspecified" requireAccess="Script" />
    </handlers>
    <rewrite>
      <rules>
        <rule name="Configure Python" stopProcessing="true">
          <match url="(.*)" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_URI}" pattern="^/{STATIC_FOLDER_PATH}/.*" ignoreCase="true" negate="true" />
          </conditions>
          <action type="Rewrite" url="handler.fcgi/{R:1}" appendQueryString="true" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>