I'm using NGINX as a reverse proxy to send requests to localhost:3001. localhost:3001 contains a docker container running a fork of the local version of prerender.io. Thus, a full request would look like server/prerender/https://google.com, and a static, rendered version of google.com gets returned.
The issue is that when I proxy_pass the request to localhost:3001, the pre-renderer logs that it failed to pre-render 'https:/google.com' (a / in https:// was removed). I tested localhost:3001 directly without going through NGINX, and it pre-rendered fine. I tried re-approaching this via rewrite rules and removing the trailing / in proxy_pass, but the end product is the same where it logs that it can't pre-render 'https:/google.com'.
Setup:
location /prerender/ { proxy_pass http://localhost:3001/; proxy_set_header Host $host; } Any idea on how to fix this issue?
merge_slashesdirective.