Skip to content

Commit

Permalink
[aspnet-examples] Fix security warnings coming from config files (#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch authored Feb 14, 2024
1 parent da14596 commit bba43f4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions examples/AspNet/Views/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
</appSettings>

<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
Expand Down
5 changes: 5 additions & 0 deletions examples/AspNet/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<httpRuntime targetFramework="4.8" maxRequestLength="2147483647" executionTimeout="300"/>
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
<remove name="OPTIONSVerbHandler"/>
Expand Down
6 changes: 5 additions & 1 deletion examples/wcf/server-aspnetframework/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@
</services>
</system.serviceModel>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
<modules runAllManagedModulesForAllRequests="true">
<add name="TelemetryHttpModule" type="OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule,OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" preCondition="integratedMode,managedHandler" />
</modules>
<directoryBrowse enabled="true" />
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
Expand Down

0 comments on commit bba43f4

Please sign in to comment.