// Copyright (c) André N. Klingsheim. See License.txt in the project root for license information.
using System;
using NWebsec.Core.Fluent;
using NWebsec.Core.HttpHeaders.Configuration;
namespace NWebsec.Middleware
{
///
/// Fluent interface to configure options for Content-Security-Options.
///
public interface IFluentCspOptions : IFluentInterface
{
///
/// Configures the default-src directive (CSP 1.0).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions DefaultSources(Action configurer);
///
/// Configures the script-src directive (CSP 1.0).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions ScriptSources(Action configurer);
///
/// Configures the object-src directive (CSP 1.0).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions ObjectSources(Action configurer);
///
/// Configures the style-src directive (CSP 1.0).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions StyleSources(Action configurer);
///
/// Configures the image-src directive (CSP 1.0).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions ImageSources(Action configurer);
///
/// Configures the media-src directive (CSP 1.0).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions MediaSources(Action configurer);
///
/// Configures the frame-src directive (CSP 1.0).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions FrameSources(Action configurer);
///
/// Configures the font-src directive (CSP 1.0).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions FontSources(Action configurer);
///
/// Configures the connect-src directive (CSP 1.0).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions ConnectSources(Action configurer);
///
/// Configures the base-uri directive (CSP 2).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions BaseUris(Action configurer);
///
/// Configures the child-src directive (CSP 2).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions ChildSources(Action configurer);
///
/// Configures the form-action directive (CSP 2).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions FormActions(Action configurer);
///
/// Configures the fram-ancestors directive (CSP 2).
///
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions FrameAncestors(Action configurer);
///
/// Configures the plugin-types directive (CSP 2).
///
/// An that configures the media types for the directive.
/// The current instance.
IFluentCspOptions PluginTypes(Action configurer);
///
/// Enables the sandbox directive (CSP 2) without further ado.
///
/// Support for this directive was optional in CSP 1.0, but is mandatory as of CSP 2.
/// The current instance.
IFluentCspOptions Sandbox();
///
/// Configures the sandbox directive (CSP 2) with one or more sources.
///
/// Support for this directive was optional in CSP 1.0, but is mandatory as of CSP 2.
/// An that configures the sources for the directive.
/// The current instance.
IFluentCspOptions Sandbox(Action configurer);
///
/// Enables the upgrade-insecure-requests directive and redirects conformant UAs to HTTPS.
///
/// This directive is not part of CSP 1.0 or CSP 2, but is described in a separate specification.
/// The HTTPS port. Defaults to 443.
/// The current instance.
IFluentCspOptions UpgradeInsecureRequests(int httpsPort = 443);
///
/// Configures the report-uri directive (CSP 1.0). Support for absolute URIs was introduced in CSP 2.
///
/// An that configures the report URIs.
/// The current instance.
IFluentCspOptions ReportUris(Action configurer);
}
}