You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
633 B
27 lines
633 B
// Copyright (c) André N. Klingsheim. See License.txt in the project root for license information.
|
|
|
|
using NWebsec.Core.HttpHeaders;
|
|
using NWebsec.Core.HttpHeaders.Configuration;
|
|
|
|
namespace NWebsec.Middleware
|
|
{
|
|
public class XFrameOptions : IXFrameOptionsConfiguration, IFluentXFrameOptions
|
|
{
|
|
internal XFrameOptions()
|
|
{
|
|
Policy = XfoPolicy.Disabled;
|
|
}
|
|
|
|
public XfoPolicy Policy { get; set; }
|
|
|
|
public void Deny()
|
|
{
|
|
Policy = XfoPolicy.Deny;
|
|
}
|
|
|
|
public void SameOrigin()
|
|
{
|
|
Policy = XfoPolicy.SameOrigin;
|
|
}
|
|
}
|
|
}
|