mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
- root web.config removes all handlers and makes all paths a 404, except default.asp to support "/".
- content directories no opt-in to static files only. - module web.configs no longer need to explicitly exclude cshtml, etc, paths. --HG-- branch : dev
This commit is contained in:
@@ -104,12 +104,13 @@
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
|
||||
<httpHandlers>
|
||||
<add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
|
||||
<!-- Block access to module and theme definition files -->
|
||||
<add verb="*" path="module.txt" validate="false" type="System.Web.HttpNotFoundHandler" />
|
||||
<add verb="*" path="theme.txt" validate="false" type="System.Web.HttpNotFoundHandler" />
|
||||
<!-- see below -->
|
||||
<clear />
|
||||
<add path="default.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" validate="true" />
|
||||
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
|
||||
|
||||
</httpHandlers>
|
||||
</system.web>
|
||||
<!--
|
||||
@@ -117,17 +118,15 @@
|
||||
Information Services 7.0. It is not necessary for previous version of IIS.
|
||||
-->
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
<modules runAllManagedModulesForAllRequests="true">
|
||||
</modules>
|
||||
<handlers>
|
||||
<remove name="MvcHttpHandler"/>
|
||||
<remove name="UrlRoutingHandler"/>
|
||||
<add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||
|
||||
<!-- Block access to module and theme definition files -->
|
||||
<add name="moduleHttpNotFoundHandler" preCondition="integratedMode" verb="*" path="module.txt" type="System.Web.HttpNotFoundHandler" />
|
||||
<add name="themeHttpNotFoundHandler" preCondition="integratedMode" verb="*" path="theme.txt" type="System.Web.HttpNotFoundHandler" />
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules runAllManagedModulesForAllRequests="true" />
|
||||
<handlers accessPolicy="Script">
|
||||
<!-- clear all handlers, prevents executing code file extensions, prevents returning any file contents -->
|
||||
<clear/>
|
||||
<!-- Return 404 for all requests via managed handler. The url routing handler will substitute the mvc request handler when routes match. -->
|
||||
<add name="Default" path="default.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode" requireAccess="Script"/>
|
||||
<add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script"/>
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
<runtime>
|
||||
|
Reference in New Issue
Block a user