I am having trouble including prerender in my application running on Nginx, I have defined a simple rule for rewriting all http requests to https , however prerender has some trouble with https running on a GoDaddy certificate , it caches the page but the content is blank.
I have tested it on http and it works fine , what I'm trying now is that if my http_user_agent
is Prerender I want to keep the http url intact and otherwise rewrite the url to https.
Any help/comments/suggestions are welcome.
Just had the same issue with prerender handling https redirects. In our case the quick solution was to force https protocol in prerender-node configuration (I assume such option should exist for any other middleware).
var prerender = require('prerender-node');
prerender.protocol = 'https';
But after all it seems to be caused by nginx misconfiguration, which does not pass x-forwarded-proto header, because otherwise it should be automatically handled by the middleware https://github.com/prerender/prerender-node/blob/master/index.js#L235-L237
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With