remove headers
This commit is contained in:
@@ -25,11 +25,16 @@ namespace lmltfy
|
||||
//Access the db to JIT the EF dll, and generate a URL to JIT parts of our DLL (improve page loads on subsequent first time app starts)
|
||||
#if DEBUG
|
||||
#else
|
||||
//MvcHandler.DisableMvcResponseHeader = true;
|
||||
// Console.WriteLine(azuredb.GetModelByKey("tdszzxr3").Brand);
|
||||
MvcHandler.DisableMvcResponseHeader = true;
|
||||
Console.WriteLine(azuredb.GetModelByKey("tdszzxr3").Brand);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
protected void Application_PreSendRequestHeaders(object sender, EventArgs e)
|
||||
{
|
||||
HttpContext.Current.Response.Headers.Remove("X-Powered-By");
|
||||
HttpContext.Current.Response.Headers.Remove("X-AspNet-Version");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<configuration>
|
||||
|
||||
<connectionStrings>
|
||||
<add name="AzureTable" connectionString="AzureTableConnectionStringHere" />
|
||||
<add name="AzureTable" connectionString="AzureTableConnectionString" />
|
||||
</connectionStrings>
|
||||
<appSettings>
|
||||
<add key="webpages:Version" value="3.0.0.0" />
|
||||
@@ -16,8 +16,9 @@
|
||||
<add key="azureTableName" value="lmltfyDev" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="~/Error" />
|
||||
<compilation debug="true" targetFramework="4.5.2" />
|
||||
<httpRuntime targetFramework="4.5.2" />
|
||||
<httpRuntime targetFramework="4.5.2" enableVersionHeader="false" />
|
||||
<httpModules>
|
||||
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Extensibility.Web.ApplicationInsightsHttpModule, Microsoft.ApplicationInsights.Extensibility.Web" />
|
||||
</httpModules>
|
||||
@@ -62,5 +63,11 @@
|
||||
<remove name="ApplicationInsightsWebTracking" />
|
||||
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Extensibility.Web.ApplicationInsightsHttpModule, Microsoft.ApplicationInsights.Extensibility.Web" preCondition="managedHandler" />
|
||||
</modules>
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<remove name="X-Powered-By" />
|
||||
<remove name="X-AspNet-Version" />
|
||||
</customHeaders>
|
||||
</httpProtocol>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user