We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b689796 commit 4bde964Copy full SHA for 4bde964
packages/overmind-website/backend/index.js
@@ -104,11 +104,11 @@ const apis = getApis()
104
const searchData = getSearchData()
105
106
const googleCrawlMiddleware = async function ssr(req, res, next) {
107
+ const userAgent = req.get('User-Agent')
108
+
109
if (
- req
- .get('User-Agent')
110
- .toLowerCase()
111
- .indexOf('googlebot') >= 0 &&
+ userAgent &&
+ userAgent.toLowerCase().indexOf('googlebot') >= 0 &&
112
!path.extname(req.path)
113
) {
114
res.send(
0 commit comments