diff --git a/_headers b/_headers deleted file mode 100644 index 218e34a6cd..0000000000 --- a/_headers +++ /dev/null @@ -1,3 +0,0 @@ -/* - X-Frame-Options: SAMEORIGIN - Content-Security-Policy: frame-ancestors 'self' https://finos.org \ No newline at end of file diff --git a/gatsby-config.js b/gatsby-config.js index 0d800fc5cb..7a9fed580e 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -11,5 +11,17 @@ module.exports = { siteMetadata: { title: `FINOS Event Calendar`, }, - plugins: [], + plugins: [ + { + resolve: 'gatsby-plugin-netlify', + options: { + headers: { + '/*': [ + 'X-Frame-Options: SAMEORIGIN', + 'Content-Security-Policy: frame-ancestors \'self\' https://finos.org', + ], + }, + }, + }, + ], }; diff --git a/package-lock.json b/package-lock.json index 88dca2412d..908c7fd852 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@mdi/js": "^7.3.67", "@mdi/react": "^1.6.1", "gatsby": "^5.14.0", + "gatsby-plugin-netlify": "^5.1.1", "googleapis": "^144.0.0", "html-react-parser": "^5.0.7", "react": "^18.2.0", @@ -9344,6 +9345,26 @@ "@parcel/core": "^2.0.0" } }, + "node_modules/gatsby-plugin-netlify": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gatsby-plugin-netlify/-/gatsby-plugin-netlify-5.1.1.tgz", + "integrity": "sha512-CembvYjbP7NJvVIdffqWaBKXMHIxYBKBEoXFGvCKX+8phRNkfmjnvoljoOakv0ypHBpgjgtpa7Nvc3PI+IjB1A==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.16.7", + "fs-extra": "^11.0.0", + "gatsby-core-utils": "^4.0.0", + "kebab-hash": "^0.1.2", + "lodash.mergewith": "^4.6.2", + "webpack-assets-manifest": "^5.0.6" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "gatsby": "^4.0.0 || ^5.0.0" + } + }, "node_modules/gatsby-plugin-page-creator": { "version": "5.14.0", "resolved": "https://registry.npmjs.org/gatsby-plugin-page-creator/-/gatsby-plugin-page-creator-5.14.0.tgz", @@ -11404,6 +11425,15 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/kebab-hash": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/kebab-hash/-/kebab-hash-0.1.2.tgz", + "integrity": "sha512-BTZpq3xgISmQmAVzkISy4eUutsUA7s4IEFlCwOBJjvSFOwyR7I+fza+tBc/rzYWK/NrmFHjfU1IhO3lu29Ib/w==", + "license": "MIT", + "dependencies": { + "lodash.kebabcase": "^4.1.1" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -11568,6 +11598,15 @@ "resolved": "https://registry.npmjs.org/lock/-/lock-1.1.0.tgz", "integrity": "sha512-NZQIJJL5Rb9lMJ0Yl1JoVr9GSdo4HTPsUEWsSFzB8dE8DSoiLCVavWZPi7Rnlv/o73u6I24S/XYc/NmG4l8EKA==" }, + "node_modules/lockfile": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lockfile/-/lockfile-1.0.4.tgz", + "integrity": "sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA==", + "license": "ISC", + "dependencies": { + "signal-exit": "^3.0.2" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -11603,6 +11642,24 @@ "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", "integrity": "sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ==" }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "license": "MIT" + }, + "node_modules/lodash.has": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.has/-/lodash.has-4.5.2.tgz", + "integrity": "sha512-rnYUdIo6xRCJnQmbVFEwcxF144erlD+M3YcJUVesflU9paQaE8p+fJDcIQrlMYbxoANFL+AB9hZrzSBBk5PL+g==", + "license": "MIT" + }, + "node_modules/lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", + "license": "MIT" + }, "node_modules/lodash.map": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", @@ -11623,6 +11680,12 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, + "node_modules/lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "license": "MIT" + }, "node_modules/lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", @@ -16461,6 +16524,45 @@ } } }, + "node_modules/webpack-assets-manifest": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/webpack-assets-manifest/-/webpack-assets-manifest-5.2.1.tgz", + "integrity": "sha512-MsEcXVio1GY6R+b4dVfTHIDMB0RB90KajQG8neRbH92vE2S1ClGw9mNa9NPlratYBvZOhExmN0qqMNFTaCTuIg==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "deepmerge": "^4.3.1", + "lockfile": "^1.0.4", + "lodash.get": "^4.4.2", + "lodash.has": "^4.5.2", + "schema-utils": "^3.3.0", + "tapable": "^2.2.1" + }, + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "webpack": "^5.2.0" + } + }, + "node_modules/webpack-assets-manifest/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/webpack-dev-middleware": { "version": "5.3.4", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", diff --git a/package.json b/package.json index 542499ba7f..5a5c31fa71 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "@mdi/js": "^7.3.67", "@mdi/react": "^1.6.1", "gatsby": "^5.14.0", + "gatsby-plugin-netlify": "^5.1.1", "googleapis": "^144.0.0", "html-react-parser": "^5.0.7", "react": "^18.2.0",