<commit_before>require('dotenv/config');

const cspConfig = [
  "connect-src 'self' https://fonts.gstatic.com;",
  "default-src 'none';",
  "font-src 'self' https://fonts.gstatic.com;",
  "img-src 'self' data: https://*.cloudfront.net;",
  "script-src 'self' 'unsafe-inline' 'unsafe-eval';",
  "style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;"
];

module.exports = {
  plugins: [
    'gatsby-plugin-react-helmet',
    {
      resolve: 'gatsby-plugin-netlify',
      options: {
        headers: {
          '/*': [
            `Content-Security-Policy: ${cspConfig.join(' ')}`,
            "Feature-Policy: 'none'",
            'Referrer-Policy: no-referrer-when-downgrade'
          ]
        },
        mergeCachingHeaders: false,
        transformHeaders: (headers, path) =>
          path.endsWith('/') || path.endsWith('.html')
            ? headers.concat(
                'Link: <https://fonts.gstatic.com/s/ibmplexsans/v2/zYXgKVElMYYaJe8bpLHnCwDKhdHeFaxOedc.woff2>; rel=preload; as=font',
                'Link: <https://fonts.gstatic.com/s/ibmplexsans/v2/zYX-KVElMYYaJe8bpLHnCwDKhdTuF6ZJW9XjDg.woff2>; rel=preload; as=font'
              )
            : headers
      }
    }<commit_msg>fix: Fix Feature-Policy default 'none'<commit_after>require('dotenv/config');

const cspConfig = [
  "connect-src 'self' https://fonts.gstatic.com;",
  "default-src 'none';",
  "font-src 'self' https://fonts.gstatic.com;",
  "img-src 'self' data: https://*.cloudfront.net;",
  "script-src 'self' 'unsafe-inline' 'unsafe-eval';",
  "style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;"
];

module.exports = {
  plugins: [
    'gatsby-plugin-react-helmet',
    {
      resolve: 'gatsby-plugin-netlify',
      options: {
        headers: {
          '/*': [
            `Content-Security-Policy: ${cspConfig.join(' ')}`,
            "Feature-Policy: default 'none'",
            'Referrer-Policy: no-referrer-when-downgrade'
          ]
        },
        mergeCachingHeaders: false,
        transformHeaders: (headers, path) =>
          path.endsWith('/') || path.endsWith('.html')
            ? headers.concat(
                'Link: <https://fonts.gstatic.com/s/ibmplexsans/v2/zYXgKVElMYYaJe8bpLHnCwDKhdHeFaxOedc.woff2>; rel=preload; as=font',
                'Link: <https://fonts.gstatic.com/s/ibmplexsans/v2/zYX-KVElMYYaJe8bpLHnCwDKhdTuF6ZJW9XjDg.woff2>; rel=preload; as=font'
              )
            : headers
      }
    }
{'fraction_non_alphanumeric': 0.17529555646147574, 'fraction_numerical': 0.006522625356706074, 'mean_word_length': 2.451476793248945, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 12, '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': '458727', 'n_tokens_mistral': 923, 'n_tokens_neox': 889, 'n_words': 111}