Last Updated: February 25, 2016
· michaelermer

Use spiderable with custom server routes, that return no html

If you are using server side routes with iron router and spiderable on meteor you will run into some weird timeouts.
A route like the following that returns a file but no text/html will cause your server to end the connection with error 500 if it was requested by a crawler.

Router.route('/thumb/:_id',  thumbRoute, {where: 'server'});

Right now the only workaround is to hack into spiderable or not use it, which is kind off impossible if you want to share pages on facebook.

Here you can find the code for the hack.