I have a number of sha256 hashes in the script source. chrome gives me this error on the first one;
The Content-Security-Policy directive name ''sha256-OIf-redacted-bJEXc='' contains one or more invalid characters. Only ASCII alphanumeric characters or dashes '-' are allowed in directive names.
The redacted section consists ONLY of a-zA-Z0-9\-
If I remove the quotes ( the only non-compliant character ) it doesn't recognise the section at all.
I'm led to believe that the error message is misleading and there is something else wrong with the hashes.
What is the true problem here? Why will chrome not accept these directives?
The header looks like this:
default-src 'none'; script-src 'self' https://consentcdn.cookiebot.com/ https://consent.cookiebot.com/ ; 'sha256-e-redacted-A=' ...more stuff...