Skip to content

Commit

Permalink
Consolidated XFrameOptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
klings committed Mar 24, 2018
1 parent 884a42c commit 1fa2c30
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 87 deletions.
1 change: 1 addition & 0 deletions src/NWebsec.AspNet.Owin/Middleware/XfoMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Threading.Tasks;
using NWebsec.Core.Common.HttpHeaders;
using NWebsec.Core.Common.HttpHeaders.Configuration;
using NWebsec.Core.Common.Middleware.Options;
using NWebsec.Owin.Core;

namespace NWebsec.Owin.Middleware
Expand Down
22 changes: 0 additions & 22 deletions src/NWebsec.AspNetCore.Middleware/IFluentXFrameOptions.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using NWebsec.AspNetCore.Core.Extensions;
using NWebsec.Core.Common.HttpHeaders;
using NWebsec.Core.Common.HttpHeaders.Configuration;
using NWebsec.Core.Common.Middleware.Options;

namespace NWebsec.AspNetCore.Middleware.Middleware
{
Expand Down
27 changes: 0 additions & 27 deletions src/NWebsec.AspNetCore.Middleware/XFrameOptions.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using NWebsec.Core.Common.Fluent;

namespace NWebsec.Owin
namespace NWebsec.Core.Common.Middleware.Options
{
/// <summary>
/// Fluent interface to configure options for X-Frame-Options.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using NWebsec.Core.Common.HttpHeaders;
using NWebsec.Core.Common.HttpHeaders.Configuration;

namespace NWebsec.Owin
namespace NWebsec.Core.Common.Middleware.Options
{
public class XFrameOptions : IXFrameOptionsConfiguration, IFluentXFrameOptions
{
internal XFrameOptions()
public XFrameOptions()
{
Policy = XfoPolicy.Disabled;
}
Expand Down
2 changes: 2 additions & 0 deletions src/NWebsec.Core.Shared/NWebsec.Core.Shared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@
<Compile Include="$(MSBuildThisFileDirectory)HttpHeaders\XfoPolicy.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HttpHeaders\XXssPolicy.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Middleware\Options\IFluentReferrerPolicyOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Middleware\Options\IFluentXFrameOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Middleware\Options\IFluentXRobotsTagOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Middleware\Options\IFluentXXssProtectionOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Middleware\Options\ReferrerPolicyOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Middleware\Options\XFrameOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Middleware\Options\XRobotsTagOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Middleware\Options\XXssProtectionOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)NWebsecContext.cs" />
Expand Down
33 changes: 0 additions & 33 deletions test/NWebsec.AspNetCore.Middleware.Tests/XFrameOptionsTests.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) André N. Klingsheim. See License.txt in the project root for license information.

using NWebsec.Core.Common.HttpHeaders;
using NWebsec.Owin;
using NWebsec.Core.Common.Middleware.Options;
using Xunit;

namespace NWebsec.AspNet.Owin.Tests
namespace NWebsec.Core.SharedProject.Tests.Middleware.Options
{
public class XFrameOptionsTests
{
Expand Down

0 comments on commit 1fa2c30

Please sign in to comment.