'directives' is a required key.

Created on 2 June 2025, 5 days ago

Problem/Motivation

I had to make an update to my existing CSP today, but it's not letting me save with this warning:

'directives' is a required key.

but it doesn't highlight any fields to indicate what specifically is validation.

I have "Report only" disabled, and "Enforced" enabled. I can't really identify what's being called out, but wondered if this is a known issue. I'm running into this on 2.2.1 (2.2.2 just seems to add D11 compatibility in the info file). Any ideas?

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bburg Washington D.C.

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bburg
  • πŸ‡ΊπŸ‡ΈUnited States bburg Washington D.C.

    It seems I was able to to it id I enable the report-only, enable one of the directives under that, add my new directive to the enforced section, save, then disable the report-only directive, and save again.

  • πŸ‡ΊπŸ‡ΈUnited States bburg Washington D.C.

    Also, when I export the config after that, it adds an empty directives key:

    @@ -2,6 +2,7 @@ _core:
       default_config_hash: o4-eDkmTmVdUICtL1VxWD3S9Ze8kNq_lHj6DskF8U8o
     report-only:
       enable: false
    +  directives: {  }
       reporting:
         plugin: none
     enforce:
    
    
Production build 0.71.5 2024