I found this on the prerender-node middleware. Someone was passing around a bad url: http://prerender.io/?utm_source=javascriptweekly&utm_medium=email?_escaped_fragment_=
Notice the two ?.
I changed the prerender-node and prerender_rails middleware to parse the query string and make sure _escaped_fragment_ is a key of the query string, not just present in it.
I found this on the prerender-node middleware. Someone was passing around a bad url:
http://prerender.io/?utm_source=javascriptweekly&utm_medium=email?_escaped_fragment_=
Notice the two
?
.I changed the prerender-node and prerender_rails middleware to parse the query string and make sure
_escaped_fragment_
is a key of the query string, not just present in it.https://github.com/collectiveip/prerender_rails/blob/master/lib/prerender_rails.rb#L82 https://github.com/collectiveip/prerender-node/blob/master/index.js#L81
Because it wasn't a key in that bad url case, the old way of checking was causing an infinite loop of prerendering to happen :)