blazor-docs/web.config

116 строки
5.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<clear />
</appSettings>
<system.web>
<httpRuntime maxRequestLength="102400" maxUrlLength="102400" maxQueryStringLength="10000" requestValidationType="System.Web.Util.RequestValidator" />
<httpModules>
<clear />
</httpModules>
<httpHandlers>
<clear />
</httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="ClaimsPrincipalHttpModule" />
<remove name="SitefinityClaimsAuthenticationModule" />
<remove name="Sitefinity" />
<remove name="SessionAuthenticationModule" />
<remove name="ScriptModule" />
<remove name="RadUploadModule" />
<remove name="SitefinityAnalyticsModule" />
</modules>
<handlers>
<remove name="xamlx-64" />
<remove name="xamlx-script" />
<remove name="svc-64" />
<remove name="svc-script" />
<remove name="xamlx" />
<remove name="svc" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<remove name="WildCard" />
<remove name="WildCard32" />
<remove name="Telerik.Web.UI.DialogHandler" />
<remove name="Telerik.RadUploadProgressHandler" />
<remove name="Telerik.Sitefinity.FilesDownloadHandler" />
<remove name="Telerik.Sitefinity.ExportSubscribersHttpHandler" />
<remove name="Telerik.Sitefinity.LibrariesRadUploadHandler" />
<remove name="Telerik.Sitefinity.Html5UploadHandler" />
<remove name="Telerik.Sitefinity.ThumbnailUploadHandler" />
<remove name="Telerik.Sitefinity.AsyncImageUploadHandler" />
<remove name="Telerik.Sitefinity.AsyncFileUploadHandler" />
<remove name="Telerik.Sitefinity.AsyncToolsetXmlUploadHandler" />
<remove name="Telerik.Web.UI.SpellCheckHandler" />
<remove name="Telerik_Web_UI_WebResource_axd" />
<remove name="Telerik_Web_UI_DialogHandler_aspx" />
<remove name="Telerik.ReportViewer.axd_*" />
</handlers>
<rewrite>
<rules>
{% for directory in site.redirect_directories %}
<rule name="redirect-directory-{{ directory.path | replace: '/', '-' }}" enabled="true"><match url="^{{ directory.path }}/?$" /><conditions logicalGrouping="MatchAll"><add input="{REQUEST_FILENAME}.html" matchType="IsFile" negate="true" /></conditions><action type="Redirect" url="{{ directory.url }}" redirectType="Found" /></rule>
{% endfor %}
{% for page in site.redirect_pages %} {% for redirect in page.previous_url %}
<rule name="redirect-page-{{ redirect | remove_first: '/' | replace: '/', '-' }}" enabled="true" stopProcessing="true"><match ignoreCase="false" url="^{{ redirect | remove_first: '/' }}$" /><action type="Redirect" url="{{ page.url | remove_first: '/' | replace: '.html', '' }}" /></rule>
{% endfor %}{% endfor %}
<rule name="redirect-" enabled="true" stopProcessing="true">
<match url="^$" />
<action type="Redirect" url="introduction" />
</rule>
<rule name="remove_html_extension" enabled="true" stopProcessing="true">
<match url="(.*)\.html$" />
<action type="Redirect" url="{R:1}" />
</rule>
<rule name="add_html_extension" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}.html" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="{R:1}.html" />
</rule>
</rules>
</rewrite>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache" />
</customHeaders>
</httpProtocol>
<staticContent>
<remove fileExtension=".json" />
<mimeMap fileExtension=".json" mimeType="application/json" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
</staticContent>
<httpErrors errorMode="DetailedLocalOnly" defaultResponseMode="File" >
<remove statusCode="403" />
<remove statusCode="404" />
<error statusCode="403" path="40x.html" />
<error statusCode="404" path="40x.html" />
</httpErrors>
</system.webServer>
<location path="api">
<system.webServer>
<security>
<requestFiltering>
<fileExtensions>
<remove fileExtension=".resources" />
</fileExtensions>
</requestFiltering>
</security>
</system.webServer>
</location>
</configuration>