<commit_before>namespace OwaspHeaders.Core.Models
{
    public class SecureHeadersMiddlewareConfiguration : ISecureHeadersMiddlewareConfiguration
    {
        /// <summary>
        /// Indicates whether the response should use HTTP Strict Transport Security
        /// </summary>
        public bool UseHsts { get; set; }

        /// <summary>
        /// Indicates whether the response should use Public Key Pinning Extension for HTTP
        /// </summary>
        public bool UseHpkp { get; set; }

        /// <summary>
        /// Indicates whether the response should use X-Frame-Options
        /// </summary>
        public bool UseXFrameOptions { get; set; }

        /// <summary>
        /// Indicates whether the response should use X-XSS-Protection
        /// </summary>                
        public bool UseXssProtection { get; set; }

        /// <summary>
        /// Indicates whether the response should use X-Content-Type-Options
        /// </summary>
        public bool UseXContentTypeOptions { get; set; }

        /// <summary>
        /// Indicates whether the response should use Content-Security-Policy
        /// </summary>
        public bool UseContentSecurityPolicy { get; set; }

        /// <summary>
        /// Indicates whether the response should use X-Permitted-Cross-Domain-Policy
        /// </summary>
        public bool UsePermittedCrossDomainPolicy { get; set; }

        /// <summary>
        /// Indicated wether the response should use Referrer-Policy
        /// </summary>
        public bool UseReferrerPolicy { get; set; }

        /// <summary>
        /// The HTTP Strict Transport Security configuration to use
        /// </summary>
        public HstsConfiguration HstsConfiguration { get; set; }

        /// <summary>
        /// The Public Key Pinning Extension for HTTP configuration to use
        /// </summary>
        public HPKPConfiguration HpkpConfiguration { get; set; }

        /// <summary>
        /// The X-Frame-Options configuration to use
        /// </summary>
        public XFrameOptionsConfiguration XFrameOptionsConfiguration { get; set; }

        /// <summary>
        /// The X-XSS-Protection configuration to use
        /// </summary>
        public XssConfiguration XssConfiguration { get; set; }

        /// <summary>
        /// The Content-Security-Policy configuration to use
        /// </summary>
        public ContentSecurityPolicyConfiguration ContentSecurityPolicyConfiguration { get; set; }

        /// <summary>
        /// The X-Permitted-Cross-Domain-Policy configuration to use
        /// </summary>
        public PermittedCrossDomainPolicyConfiguration PermittedCrossDomainPolicyConfiguration { get; set; }

        /// <summary>
        /// The Referrer-Policy configuration to use
        /// </summary>
        public ReferrerPolicy ReferrerPolicy { get; set; }
        
        public SecureHeadersMiddlewareConfiguration()
        {
            UseHsts = true;
            UseHpkp = true;
            UseXFrameOptions = true;
            UseXssProtection = true;
            UseXContentTypeOptions = true;
            UseContentSecurityPolicy = true;
            UsePermittedCrossDomainPolicy = true;
            UseReferrerPolicy = true;

            HstsConfiguration = new HstsConfiguration();
            HpkpConfiguration = new HPKPConfiguration();
            XFrameOptionsConfiguration = new XFrameOptionsConfiguration();
            XssConfiguration = new XssConfiguration();
            ContentSecurityPolicyConfiguration = new ContentSecurityPolicyConfiguration();
            PermittedCrossDomainPolicyConfiguration = new PermittedCrossDomainPolicyConfiguration();
            ReferrerPolicy = new ReferrerPolicy();
        }
        
    }
}<commit_msg>Middleware will now only include the headers that the user explicitly sets in the consuming application's config file<commit_after>namespace OwaspHeaders.Core.Models
{
    public class SecureHeadersMiddlewareConfiguration : ISecureHeadersMiddlewareConfiguration
    {
        /// <summary>
        /// Indicates whether the response should use HTTP Strict Transport Security
        /// </summary>
        public bool UseHsts { get; set; }

        /// <summary>
        /// Indicates whether the response should use Public Key Pinning Extension for HTTP
        /// </summary>
        public bool UseHpkp { get; set; }

        /// <summary>
        /// Indicates whether the response should use X-Frame-Options
        /// </summary>
        public bool UseXFrameOptions { get; set; }

        /// <summary>
        /// Indicates whether the response should use X-XSS-Protection
        /// </summary>                
        public bool UseXssProtection { get; set; }

        /// <summary>
        /// Indicates whether the response should use X-Content-Type-Options
        /// </summary>
        public bool UseXContentTypeOptions { get; set; }

        /// <summary>
        /// Indicates whether the response should use Content-Security-Policy
        /// </summary>
        public bool UseContentSecurityPolicy { get; set; }

        /// <summary>
        /// Indicates whether the response should use X-Permitted-Cross-Domain-Policy
        /// </summary>
        public bool UsePermittedCrossDomainPolicy { get; set; }

        /// <summary>
        /// Indicated wether the response should use Referrer-Policy
        /// </summary>
        public bool UseReferrerPolicy { get; set; }

        /// <summary>
        /// The HTTP Strict Transport Security configuration to use
        /// </summary>
        public HstsConfiguration HstsConfiguration { get; set; }

        /// <summary>
        /// The Public Key Pinning Extension for HTTP configuration to use
        /// </summary>
        public HPKPConfiguration HpkpConfiguration { get; set; }

        /// <summary>
        /// The X-Frame-Options configuration to use
        /// </summary>
        public XFrameOptionsConfiguration XFrameOptionsConfiguration { get; set; }

        /// <summary>
        /// The X-XSS-Protection configuration to use
        /// </summary>
        public XssConfiguration XssConfiguration { get; set; }

        /// <summary>
        /// The Content-Security-Policy configuration to use
        /// </summary>
        public ContentSecurityPolicyConfiguration ContentSecurityPolicyConfiguration { get; set; }

        /// <summary>
        /// The X-Permitted-Cross-Domain-Policy configuration to use
        /// </summary>
        public PermittedCrossDomainPolicyConfiguration PermittedCrossDomainPolicyConfiguration { get; set; }

        /// <summary>
        /// The Referrer-Policy configuration to use
        /// </summary>
        public ReferrerPolicy ReferrerPolicy { get; set; }
        
        public SecureHeadersMiddlewareConfiguration()
        {
            UseHsts = false;
            UseHpkp = false;
            UseXFrameOptions = false;
            UseXssProtection = false;
            UseXContentTypeOptions = false;
            UseContentSecurityPolicy = false;
            UsePermittedCrossDomainPolicy = false;
            UseReferrerPolicy = false;

            HstsConfiguration = new HstsConfiguration();
            HpkpConfiguration = new HPKPConfiguration();
            XFrameOptionsConfiguration = new XFrameOptionsConfiguration();
            XssConfiguration = new XssConfiguration();
            ContentSecurityPolicyConfiguration = new ContentSecurityPolicyConfiguration();
            PermittedCrossDomainPolicyConfiguration = new PermittedCrossDomainPolicyConfiguration();
            ReferrerPolicy = new ReferrerPolicy();
        }
        
    }
}
{'fraction_non_alphanumeric': 0.09205729166666667, 'fraction_numerical': 0.0, 'mean_word_length': 1.9910436137071652, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3395429', 'n_tokens_mistral': 1779, 'n_tokens_neox': 1760, 'n_words': 531}