Skip to content

Commit

Permalink
add additional hashes to script-src-elem and style-src-elem directive…
Browse files Browse the repository at this point in the history
…s in gatsby-config

Signed-off-by: Michael Robinson <[email protected]>
  • Loading branch information
merobi-hub committed Aug 24, 2023
1 parent daf7c50 commit 4048cbe
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 102 deletions.
4 changes: 2 additions & 2 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ const plugins = [
mergeDefaultDirectives: true,
directives: {
"script-src": "'self' 'unsafe-eval' https://plausible.io/js/script.outbound-links.js",
"script-src-elem": "'self' https://plausible.io/js/script.outbound-links.js",
"script-src-elem": "'self' 'unsafe-hashes' 'sha256-OzUnmjMIVuS+lOnNyveodXW96iw8WIDsfo02bVyJTKE=' 'sha256-r1R1bJHQ2LX3ekmreqx7Y+aSiGGrpPYACbCKNP9s82Q=' 'sha256-egpbluqkD8NT0bY3bWy7raM9tRIMkfUWboq0Y8KqsFk=' https://plausible.io/js/script.outbound-links.js",
"style-src": "'self' 'unsafe-hashes' 'sha256-iahNazrr5t3BQXcVfXbYSR8Bd2AOXPifwVTBbIKb/bE=' 'sha256-7buiYDizqbiAS404WOu2AY5NZDzyVesjpBU80D6Nno4=' 'sha256-f7qc12gYVX0xoX9jAoOIxHvtXcfppKYwcBr7sE0GLR4=' 'sha256-o4LYhp5wtluJ8/NWUV2vi+r5AxmP8X2zEvYHCpji+kI=' 'sha256-MtxTLcyxVEJFNLEIqbVTaqR4WWr0+lYSZ78AzGmNsuA=' https://fonts.googleapis.com",
"style-src-elem": "'self' 'sha256-27nLLCfJPKzC4cpzFwNqY3YTXYmR0/qs1ExOGhQCw/c=' 'sha256-cLHlYu9WwZQgD1K6YlWPqFYXJEuD9YpxdlDktBDedco=' https://fonts.googleapis.com",
"style-src-elem": "'self' 'unsafe-hashes' 'sha256-UrOiXfLZp9TdAD7NY9X+JKYQ8F+C7AsCo9loq6bNNX8=' 'sha256-27nLLCfJPKzC4cpzFwNqY3YTXYmR0/qs1ExOGhQCw/c=' 'sha256-cLHlYu9WwZQgD1K6YlWPqFYXJEuD9YpxdlDktBDedco=' https://fonts.googleapis.com",
"font-src": "'self' data: https://fonts.gstatic.com/s/karla/v30/qkBIXvYC6trAT55ZBi1ueQVIjQTD-JqaHUlKZbLXGhmRytc.woff2 https://fonts.gstatic.com/s/karla/v30/qkBIXvYC6trAT55ZBi1ueQVIjQTD-JqaE0lKZbLXGhmR.woff2",
}
}
Expand Down
200 changes: 100 additions & 100 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3489,6 +3489,22 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "postCssPlugins",
"description": null,
"args": [],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "SitePluginPluginOptionsPostCssPlugins",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "trackingIds",
"description": null,
Expand Down Expand Up @@ -3588,19 +3604,26 @@
},
"isDeprecated": false,
"deprecationReason": null
},
}
],
"inputFields": null,
"interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "SitePluginPluginOptionsPostCssPlugins",
"description": null,
"fields": [
{
"name": "postCssPlugins",
"name": "postcssPlugin",
"description": null,
"args": [],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "SitePluginPluginOptionsPostCssPlugins",
"ofType": null
}
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
Expand Down Expand Up @@ -3682,29 +3705,6 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "SitePluginPluginOptionsPostCssPlugins",
"description": null,
"fields": [
{
"name": "postcssPlugin",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "SitePluginPackageJson",
Expand Down Expand Up @@ -20172,6 +20172,16 @@
},
"defaultValue": null
},
{
"name": "postCssPlugins",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "SitePluginPluginOptionsPostCssPluginsFilterListInput",
"ofType": null
},
"defaultValue": null
},
{
"name": "trackingIds",
"description": null,
Expand Down Expand Up @@ -20251,13 +20261,24 @@
"ofType": null
},
"defaultValue": null
},
}
],
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "SitePluginPluginOptionsPostCssPluginsFilterListInput",
"description": null,
"fields": null,
"inputFields": [
{
"name": "postCssPlugins",
"name": "elemMatch",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "SitePluginPluginOptionsPostCssPluginsFilterListInput",
"name": "SitePluginPluginOptionsPostCssPluginsFilterInput",
"ofType": null
},
"defaultValue": null
Expand All @@ -20269,22 +20290,33 @@
},
{
"kind": "INPUT_OBJECT",
"name": "SitePluginPluginOptionsDirectivesFilterInput",
"name": "SitePluginPluginOptionsPostCssPluginsFilterInput",
"description": null,
"fields": null,
"inputFields": [
{
"name": "script_src",
"name": "postcssPlugin",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "StringQueryOperatorInput",
"ofType": null
},
"defaultValue": null
},
}
],
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "SitePluginPluginOptionsDirectivesFilterInput",
"description": null,
"fields": null,
"inputFields": [
{
"name": "script_src_elem",
"name": "script_src",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
Expand All @@ -20294,7 +20326,7 @@
"defaultValue": null
},
{
"name": "style_src",
"name": "script_src_elem",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
Expand All @@ -20304,7 +20336,7 @@
"defaultValue": null
},
{
"name": "style_src_elem",
"name": "style_src",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
Expand All @@ -20314,49 +20346,17 @@
"defaultValue": null
},
{
"name": "font_src",
"name": "style_src_elem",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "StringQueryOperatorInput",
"ofType": null
},
"defaultValue": null
}
],
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "SitePluginPluginOptionsPostCssPluginsFilterListInput",
"description": null,
"fields": null,
"inputFields": [
{
"name": "elemMatch",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "SitePluginPluginOptionsPostCssPluginsFilterInput",
"ofType": null
},
"defaultValue": null
}
],
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "SitePluginPluginOptionsPostCssPluginsFilterInput",
"description": null,
"fields": null,
"inputFields": [
},
{
"name": "postcssPlugin",
"name": "font_src",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
Expand Down Expand Up @@ -21674,6 +21674,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginCreator___pluginOptions___postCssPlugins",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginCreator___pluginOptions___postCssPlugins___postcssPlugin",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginCreator___pluginOptions___trackingIds",
"description": null,
Expand Down Expand Up @@ -21746,18 +21758,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginCreator___pluginOptions___postCssPlugins",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginCreator___pluginOptions___postCssPlugins___postcssPlugin",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginCreator___packageJson___name",
"description": null,
Expand Down Expand Up @@ -23024,6 +23024,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginOptions___postCssPlugins",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginOptions___postCssPlugins___postcssPlugin",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginOptions___trackingIds",
"description": null,
Expand Down Expand Up @@ -23096,18 +23108,6 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginOptions___postCssPlugins",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pluginOptions___postCssPlugins___postcssPlugin",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "packageJson___name",
"description": null,
Expand Down

0 comments on commit 4048cbe

Please sign in to comment.