Skip to content

Commit bb0943f

Browse files
fix(website): fix crawling
1 parent 742a089 commit bb0943f

File tree

1 file changed

+1
-10
lines changed
  • packages/overmind-website/backend

1 file changed

+1
-10
lines changed

packages/overmind-website/backend/index.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,13 @@ const apis = getApis()
104104
const searchData = getSearchData()
105105

106106
const googleCrawlMiddleware = async function ssr(req, res, next) {
107-
const url = req.protocol + '://' + req.hostname + req.path
108-
109-
console.log(
110-
req.get('User-Agent'),
111-
path.extname(url),
112-
path.extname(url).length
113-
)
114107
if (
115108
req
116109
.get('User-Agent')
117110
.toLowerCase()
118111
.indexOf('googlebot') >= 0 &&
119-
!path.extname(url)
112+
!path.extname(req.path)
120113
) {
121-
console.log('grabbing from service')
122114
res.send(
123115
await new Promise((resolve) => {
124116
https.get(
@@ -134,7 +126,6 @@ const googleCrawlMiddleware = async function ssr(req, res, next) {
134126
})
135127
)
136128
} else {
137-
console.log('next')
138129
next()
139130
}
140131
}

0 commit comments

Comments
 (0)