From bb0943f710a36e5658b3256786ce63dea695a46f Mon Sep 17 00:00:00 2001 From: christianalfoni Date: Tue, 1 Jan 2019 23:41:46 +0100 Subject: [PATCH] fix(website): fix crawling --- packages/overmind-website/backend/index.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/overmind-website/backend/index.js b/packages/overmind-website/backend/index.js index baf9fd2d..2c08c5b8 100644 --- a/packages/overmind-website/backend/index.js +++ b/packages/overmind-website/backend/index.js @@ -104,21 +104,13 @@ const apis = getApis() const searchData = getSearchData() const googleCrawlMiddleware = async function ssr(req, res, next) { - const url = req.protocol + '://' + req.hostname + req.path - - console.log( - req.get('User-Agent'), - path.extname(url), - path.extname(url).length - ) if ( req .get('User-Agent') .toLowerCase() .indexOf('googlebot') >= 0 && - !path.extname(url) + !path.extname(req.path) ) { - console.log('grabbing from service') res.send( await new Promise((resolve) => { https.get( @@ -134,7 +126,6 @@ const googleCrawlMiddleware = async function ssr(req, res, next) { }) ) } else { - console.log('next') next() } }