-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
Maybe I'm not reading the spec correctly, but it says that for HTML5 pushstate URLs you get pinged with "?escaped_fragment=". Notice that the get parameter has no value, it's just an empty string.
As such, when I was testing this out on my app, I tried this:
$ curl "http://localhost:3000?_escaped_fragment_="But this didn't trigger the SEO middleware.
Digging into the source, I found that you do this in lib/mean-seo.js:39:
return function SEO(req, res, next) {
var escapedFragment = req.query._escaped_fragment_;
//If the request came from a crawler
if (escapedFragment) {
/* do SEO stuff */
} else {
next();
}
}For my CURL, that comes up as falsey.
Shouldn't the if conditional rather test for escapedFragment !== undefined?
Metadata
Metadata
Assignees
Labels
No labels