From 051a45facb9ea365342ef12d570da5ad8bf7570f Mon Sep 17 00:00:00 2001 From: Jonas Braathen Date: Sun, 27 Jan 2019 11:36:37 +0100 Subject: [PATCH] Whitelist and blacklist Wordpress REST routes --- gatsby-config.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gatsby-config.js b/gatsby-config.js index 4965b3b..3af3488 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -19,6 +19,22 @@ module.exports = { auth: {}, // Set to true to debug endpoints on 'gatsby build' verboseOutput: true, + includedRoutes: [ + "**/*/*/categories", + "**/*/*/events", + "**/*/*/posts", + "**/*/*/pages", + "**/*/*/media", + "**/*/*/tags", + "**/*/*/taxonomies", + "**/*/*/users", + ], + excludedRoutes: [ + "/yoast/**", + "**/*/*/comments", + "**/*/*/settings", + "**/*/*/users/me", + ], }, }, 'gatsby-plugin-sharp',