Skip to content

Commit

Permalink
Ensuring web.config dev/release versions only differ in debug/caching…
Browse files Browse the repository at this point in the history
… situations
  • Loading branch information
mawtex committed Jan 10, 2017
1 parent e52dd88 commit 86fa314
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
6 changes: 4 additions & 2 deletions Website/DebugBuild.Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,14 @@
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
<staticContent>
<remove fileExtension=".json" />
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
<remove fileExtension=".json" />
<remove fileExtension=".scss" />
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".scss" mimeType="text/css" />
</staticContent>
</system.webServer>
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Expand Down
16 changes: 10 additions & 6 deletions Website/ReleaseBuild.Web.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configuration>
<!-- Hey Dev! Changing or removing existing elements in this file may cause functionality in Orckestra CMS to break -->
<system.web>
<trust level="Full" />
Expand All @@ -21,7 +20,8 @@
<add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor" />
</buildProviders>
</compilation>
<httpRuntime targetFramework="4.6.1" relaxedUrlToFileSystemMapping="true" requestPathInvalidCharacters="&lt;,&gt;,*,%,&amp;,\,?" /> <!-- colon removed from @requestPathInvalidCharacters -->
<httpRuntime targetFramework="4.6.1" maxRequestLength="20480" relaxedUrlToFileSystemMapping="true" requestPathInvalidCharacters="&lt;,&gt;,*,%,&amp;,\,?" />
<!-- colon removed from @requestPathInvalidCharacters -->
<xhtmlConformance mode="Strict" />
<trace enabled="false" traceMode="SortByTime" requestLimit="100" writeToDiagnosticsTrace="false" pageOutput="true" />
<pages clientIDMode="AutoID">
Expand Down Expand Up @@ -68,10 +68,10 @@
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="UrlRoutingModule"/>
<remove name="UrlRoutingModule" />
<add name="ApplicationOfflineCheck" type="Composite.Core.Application.ApplicationOfflineCheckHttpModule, Composite" />
<add name="AjaxResponseHandler" type="Composite.Core.WebClient.Ajax.AjaxResponseHttpModule, Composite" />
<add name="CompositeAdministrativeResponseFilter" type="Composite.Core.WebClient.HttpModules.AdministrativeResponseFilterHttpModule" />
<add name="CompositeAdministrativeResponseFilter" type="Composite.Core.WebClient.HttpModules.AdministrativeResponseFilterHttpModule, Composite" />
<add name="CompositeAdministrativeAuthorization" type="Composite.Core.WebClient.HttpModules.AdministrativeAuthorizationHttpModule, Composite" />
<add name="CompositeRequestInterceptor" type="Composite.Core.WebClient.Renderings.RequestInterceptorHttpModule, Composite" />
<add name="CompositeAdministrativeDataScopeSetter" type="Composite.Core.WebClient.HttpModules.AdministrativeDataScopeSetterHttpModule, Composite" />
Expand All @@ -86,7 +86,11 @@
</handlers>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
</staticContent>
<remove fileExtension=".json" />
<remove fileExtension=".scss" />
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".scss" mimeType="text/css" />
</staticContent>
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />
</system.webServer>
<system.serviceModel>
Expand Down
5 changes: 0 additions & 5 deletions Website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,6 @@
"lodash": "^4.15.0",
"supports-color": "^3.1.2"
}
},
"npm:[email protected]": {
"main": "unexpected.js",
"dependencies": {},
"jspmPackage": true
}
}
}
Expand Down

4 comments on commit 86fa314

@burningice2866
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mawtex having clientCache set to 30 days in Debug environment can be a pain when working on updating some design or javascript :(

@mawtex
Copy link
Collaborator Author

@mawtex mawtex commented on 86fa314 Jan 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So true - but I honestly could not find some number that would make everyone happy. I'm thinking that devs actively working with design / scripting will actively refresh / disable cache, no matter what while everyone else will be happy not to reload things. Anyway, this is a dev config, so we can go low - got a magic time span?

@burningice2866
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mawtex IMHO a dev-config shouldn't have things like clientcache, compression etc. at all, since its for development, just like you also set FullPageCaching to 0 in Debug and 60 in Release

@mawtex
Copy link
Collaborator Author

@mawtex mawtex commented on 86fa314 Jan 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For debug I've pushed "NoControl" (default, so what we had before)

Please sign in to comment.